:root {
  --paper: #f6f4ed;
  --paper-deep: #eeece3;
  --card: #fffefa;
  --ink: #202124;
  --muted: #6f706d;
  --soft-muted: #969690;
  --line: rgba(32, 33, 36, 0.12);
  --purple: #7567e8;
  --purple-dark: #5d50cd;
  --shadow-sm: 0 8px 24px rgba(39, 37, 31, 0.07);
  --shadow-lg: 0 28px 80px rgba(39, 37, 31, 0.14);
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 34px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

[hidden] { display: none !important; }

.header-actions { display: flex; align-items: center; justify-self: end; gap: 12px; }
.language-menu { position: relative; font-size: 13px; }
.language-menu summary {
  display: flex; align-items: center; gap: 8px; min-height: 40px;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); cursor: pointer; list-style: none;
}
.language-menu summary::-webkit-details-marker { display: none; }
.language-label-short { display: none; }
.language-switch {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px);
  display: grid; gap: 3px; min-width: 195px; padding: 8px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--card);
  box-shadow: var(--shadow-sm); z-index: 30;
}
.language-switch a { padding: 10px 12px; border-radius: 8px; text-align: start; }
.language-switch a:hover, .language-switch a[aria-current] { background: #eeeaff; color: var(--purple-dark); }
.skip-link { position: fixed; top: -100px; inset-inline-start: 16px; z-index: 50; padding: 12px 20px; background: var(--ink); color: white; border-radius: 8px; }
.skip-link:focus { top: 12px; }
:is(a, button, summary, input, select, textarea):focus-visible { outline: 3px solid var(--purple); outline-offset: 4px; }
.tool-page { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 36px 0 72px; }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 13px; margin-bottom: 32px; }
.breadcrumbs a:hover, .back-to-tools:hover { color: var(--purple-dark); }
.tool-page-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 30px; }
.tool-page-heading { display: flex; align-items: flex-start; gap: 18px; }
.tool-page-icon { display: grid; place-items: center; flex: none; width: 62px; height: 62px; border: 1px solid #ddd6fa; border-radius: 20px; background: #ece8ff; color: var(--purple-dark); }
.tool-page-icon svg { width: 28px; height: 28px; }
.tool-page h1 { margin: 8px 0 10px; font-size: clamp(28px, 4vw, 42px); line-height: 1.2; letter-spacing: -0.035em; overflow-wrap: anywhere; }
.tool-page-description { color: var(--muted); font-size: 15px; line-height: 1.7; margin: 0; }
.back-to-tools { flex: none; font-size: 13px; font-weight: 650; }
.tool-workspace { min-width: 0; padding: 28px; border: 1px solid var(--line); border-radius: 24px; background: var(--card); box-shadow: var(--shadow-sm); }
.tool-page-privacy { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 22px 0 48px; color: var(--muted); font-size: 12px; }
.tool-page-privacy svg { flex: none; color: #519063; }
.tool-guide { margin-block: 0 40px; padding: clamp(18px, 3vw, 28px); border: 1px solid var(--line); border-radius: 22px; background: var(--card); line-height: 1.75; overflow-wrap: anywhere; }
.tool-guide h2 { margin: 0 0 16px; font-size: 22px; }
.tool-guide h3 { margin: 24px 0 8px; font-size: 16px; }
.tool-guide p, .tool-guide ul { margin-block: 10px; }
.tool-guide ul { padding-inline-start: 24px; }
.tool-guide a { text-decoration: underline; text-underline-offset: 3px; }
.tool-guide summary { cursor: pointer; font-weight: 650; }
.tool-guide details { margin-block-start: 20px; }
.tool-guide pre { max-height: 260px; overflow: auto; padding: 16px; border-radius: 12px; background: var(--paper); white-space: pre-wrap; overflow-wrap: anywhere; text-align: left; }
.related-tools h2 { margin: 0; font-size: 22px; }
.related-tools .section-heading { gap: 20px; flex-wrap: wrap; }
.related-tools .section-heading > a { font-size: 13px; color: var(--muted); }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tool-workspace :is(.field-grid, .tool-layout, .tool-panel, .formatter-pane) { min-width: 0; }
/* Text follows the page direction; code, addresses and numeric controls remain LTR. */
:is(.code, .formatter-editor, .password-result, .copy-field input, input[type="number"], input[type="datetime-local"], .chmod-results strong, .network-results strong, .calculation-result, .live-time strong) { direction: ltr; text-align: left; unicode-bidi: isolate; }
[dir="rtl"] :is(.tool-label-row, .field-group, .tool-card, .hero-copy, .principles-intro) { text-align: right; }
[dir="rtl"] .hero-visual { direction: ltr; }
[dir="rtl"] :is(.back-to-tools, .breadcrumbs) { unicode-bidi: isolate; }
[dir="rtl"] :is(h1, h2, .eyebrow, .section-kicker) { letter-spacing: normal; }
html[lang="ja"] :is(h1, h2) { line-break: strict; letter-spacing: normal; }
@media (max-width: 860px) {
  .tool-page-header { align-items: flex-start; }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .header-actions { gap: 6px; }
  .language-menu summary { padding: 8px; font-size: 12px; }
  .language-menu summary > span:first-child { display: none; }
  .tool-page { width: calc(100% - 30px); padding-top: 24px; }
  .tool-page-header { flex-direction: column; gap: 18px; }
  .tool-page-heading { gap: 12px; }
  .tool-page-icon { width: 44px; height: 44px; border-radius: 14px; }
  .tool-page-icon svg { width: 22px; height: 22px; }
  .tool-workspace { padding: 16px; border-radius: 18px; }
  /* Keep decorative circles out of the mobile RTL scroll area. */
  body[data-tool="regex-tester"] .page-glow { position: fixed; }
  .related-grid { grid-template-columns: 1fr; }
  .tool-page-privacy { align-items: flex-start; line-height: 1.6; }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.svg-sprite,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-glow {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(1px);
  pointer-events: none;
}

.page-glow-one {
  top: 160px;
  left: -170px;
  width: 430px;
  height: 430px;
  background: rgba(248, 217, 111, 0.18);
}

.page-glow-two {
  top: 400px;
  right: -230px;
  width: 520px;
  height: 520px;
  background: rgba(117, 103, 232, 0.1);
}

.site-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(1180px, calc(100% - 48px));
  min-height: 82px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 11px;
  width: max-content;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 7px);
  grid-template-rows: repeat(2, 7px);
  gap: 3px;
  place-content: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--ink);
  box-shadow: 0 5px 12px rgba(31, 32, 34, 0.16);
  transform: rotate(-3deg);
}

.brand-mark i {
  display: block;
  border-radius: 2.5px;
  background: #fff;
}

.brand-mark i:nth-child(2) {
  background: #d9ceff;
}

.brand-mark i:nth-child(3) {
  background: #f5d96d;
}

.brand-name {
  font-size: 17px;
  font-weight: 550;
  letter-spacing: -0.025em;
}

.brand-name strong {
  font-weight: 800;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.main-nav a {
  position: relative;
  padding: 10px 0;
  color: #535451;
  font-size: 14px;
  font-weight: 600;
}

.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--purple);
  content: "";
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  transform: scaleX(1);
}

.header-search {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
  min-height: 40px;
  padding: 0 9px 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.56);
  color: #646560;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.header-search:hover {
  border-color: rgba(117, 103, 232, 0.42);
  background: #fff;
  transform: translateY(-1px);
}

.header-search svg {
  width: 16px;
  height: 16px;
}

.header-search span {
  font-size: 13px;
  font-weight: 600;
}

kbd {
  display: inline-grid;
  min-width: 23px;
  height: 23px;
  place-items: center;
  border: 1px solid rgba(32, 33, 36, 0.12);
  border-bottom-color: rgba(32, 33, 36, 0.22);
  border-radius: 6px;
  background: #fff;
  color: #797a75;
  font-family: inherit;
  font-size: 11px;
  box-shadow: 0 1px 1px rgba(32, 33, 36, 0.06);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  gap: 64px;
  align-items: center;
  width: min(1180px, calc(100% - 48px));
  min-height: 680px;
  margin: 0 auto;
  padding: 86px 0 98px;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  color: #656661;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.eyebrow span {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e7e1ff;
}

.eyebrow span::after {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--purple);
  content: "";
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-family: "Iowan Old Style", "Baskerville", "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(52px, 5.35vw, 72px);
  font-weight: 650;
  letter-spacing: -0.06em;
  line-height: 1.06;
}

.hero h1 em {
  position: relative;
  color: var(--purple-dark);
  font-weight: 600;
}

.hero h1 em::after {
  position: absolute;
  right: 1px;
  bottom: -7px;
  left: 2px;
  height: 8px;
  border-top: 3px solid #f0ce58;
  border-radius: 50%;
  content: "";
  transform: rotate(-1deg);
}

.hero-description {
  max-width: 560px;
  margin: 28px 0 30px;
  color: #646560;
  font-size: 17px;
  line-height: 1.85;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 590px;
  height: 64px;
  border: 1px solid rgba(32, 33, 36, 0.12);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 13px 32px rgba(40, 38, 32, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.search-wrap:focus-within {
  border-color: rgba(117, 103, 232, 0.62);
  box-shadow: 0 16px 38px rgba(67, 57, 128, 0.13), 0 0 0 4px rgba(117, 103, 232, 0.1);
  transform: translateY(-1px);
}

.search-wrap > svg {
  flex: none;
  width: 21px;
  height: 21px;
  margin-inline-start: 21px;
  color: #666760;
}

.search-wrap input {
  min-width: 0;
  flex: 1;
  height: 100%;
  padding: 0 14px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15px;
}

.search-wrap input::placeholder {
  color: #aaa9a3;
}

.search-shortcut {
  flex: none;
  margin-inline-end: 14px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--paper);
  color: #979790;
  font-size: 11px;
  font-weight: 650;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  color: #898984;
  font-size: 12px;
}

.quick-links button {
  padding: 5px 8px;
  border-radius: 7px;
  background: transparent;
  color: #666762;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.quick-links button:hover,
.quick-links button:focus-visible {
  background: rgba(117, 103, 232, 0.1);
  color: var(--purple-dark);
}

.hero-visual {
  position: relative;
  min-height: 470px;
  isolation: isolate;
}

.hero-visual::before {
  position: absolute;
  z-index: -2;
  top: 50%;
  left: 50%;
  width: 410px;
  height: 410px;
  border-radius: 50%;
  background: #e8e2ff;
  content: "";
  transform: translate(-50%, -50%);
}

.hero-visual::after {
  position: absolute;
  z-index: -1;
  right: 24px;
  bottom: 14px;
  width: 240px;
  height: 62px;
  border-radius: 50%;
  background: rgba(39, 37, 50, 0.18);
  content: "";
  filter: blur(28px);
  transform: rotate(-7deg);
}

.orbit {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  border: 1px dashed rgba(89, 77, 171, 0.22);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-16deg);
}

.orbit-one {
  width: 475px;
  height: 310px;
}

.orbit-two {
  width: 355px;
  height: 445px;
  transform: translate(-50%, -50%) rotate(38deg);
}

.workspace-card {
  position: absolute;
  top: 64px;
  left: 50%;
  width: min(390px, calc(100% - 44px));
  padding: 20px;
  border: 1px solid rgba(32, 33, 36, 0.1);
  border-radius: 27px;
  background: rgba(255, 254, 250, 0.96);
  box-shadow: var(--shadow-lg), 0 3px 0 rgba(32, 33, 36, 0.08);
  transform: translateX(-50%) rotate(2.2deg);
}

.workspace-bar,
.workspace-heading,
.workspace-action,
.stat-row {
  display: flex;
  align-items: center;
}

.workspace-bar {
  justify-content: space-between;
  margin-bottom: 25px;
}

.window-dots {
  display: flex;
  gap: 5px;
}

.window-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #dedbd1;
}

.window-dots i:first-child {
  background: #f19b86;
}

.window-dots i:nth-child(2) {
  background: #edcf67;
}

.window-dots i:last-child {
  background: #8cc99f;
}

.local-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 8px;
  background: #edf7ee;
  color: #4b7b57;
  font-size: 10px;
  font-weight: 700;
}

.local-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #66ad78;
  box-shadow: 0 0 0 3px rgba(102, 173, 120, 0.13);
}

.workspace-heading {
  gap: 12px;
  margin-bottom: 17px;
}

.workspace-icon {
  display: grid;
  width: 41px;
  height: 41px;
  place-items: center;
  border-radius: 13px;
  background: #f0edff;
  color: var(--purple);
}

.workspace-icon svg {
  width: 19px;
  height: 19px;
}

.workspace-heading b,
.workspace-heading small {
  display: block;
}

.workspace-heading b {
  margin-bottom: 4px;
  font-size: 15px;
}

.workspace-heading small {
  color: #9a9994;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.fake-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 73px;
  padding: 15px;
  border: 1px solid rgba(32, 33, 36, 0.09);
  border-radius: 13px;
  background: #faf9f4;
  color: #62635e;
  font-size: 12px;
}

.fake-input i {
  width: 2px;
  height: 18px;
  border-radius: 2px;
  background: var(--purple);
  animation: blink 1.1s steps(2, start) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.stat-row {
  gap: 7px;
  margin-top: 9px;
}

.stat-row div {
  min-width: 0;
  flex: 1;
  padding: 12px 6px;
  border-radius: 11px;
  background: #f0edff;
  text-align: center;
}

.stat-row div:nth-child(2) {
  background: #fff3d3;
}

.stat-row div:nth-child(3) {
  background: #eaf7ed;
}

.stat-row strong,
.stat-row span {
  display: block;
}

.stat-row strong {
  margin-bottom: 3px;
  font-size: 20px;
  letter-spacing: -0.04em;
}

.stat-row span {
  color: #81817b;
  font-size: 9px;
}

.workspace-action {
  justify-content: space-between;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(32, 33, 36, 0.08);
  color: #777872;
  font-size: 10px;
  font-weight: 650;
}

.workspace-action i {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #e9f5eb;
  color: #5c9e6c;
}

.workspace-action svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.2;
}

.float-chip,
.privacy-sticker {
  position: absolute;
  z-index: 3;
  box-shadow: 0 14px 34px rgba(39, 37, 31, 0.14);
  animation: float 5.5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--rotate, 0deg)); }
  50% { transform: translateY(-9px) rotate(var(--rotate, 0deg)); }
}

.float-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid rgba(32, 33, 36, 0.08);
  border-radius: 11px;
  background: #fff;
  color: #62635e;
  font-size: 10px;
  font-weight: 800;
}

.chip-json {
  --rotate: -7deg;
  top: 33px;
  right: 22px;
}

.chip-json span {
  color: var(--purple);
  font-size: 14px;
}

.chip-color {
  --rotate: 6deg;
  top: 155px;
  left: 0;
  animation-delay: -1.8s;
}

.chip-color i {
  width: 13px;
  height: 13px;
  border-radius: 4px;
  background: #7c6cf2;
}

.privacy-sticker {
  --rotate: -3deg;
  right: -2px;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border: 1px solid rgba(32, 33, 36, 0.09);
  border-radius: 14px;
  background: #27302b;
  color: #fff;
  animation-delay: -3s;
}

.privacy-sticker > svg {
  width: 19px;
  height: 19px;
  color: #9fe1ab;
}

.privacy-sticker strong,
.privacy-sticker span {
  display: block;
}

.privacy-sticker strong {
  margin-bottom: 3px;
  font-size: 11px;
}

.privacy-sticker span {
  color: #bdc8c0;
  font-size: 8px;
}

.tools-section {
  width: min(1260px, calc(100% - 32px));
  margin: 0 auto;
  padding: 76px max(24px, calc((100% - 1132px) / 2)) 96px;
  border: 1px solid rgba(32, 33, 36, 0.08);
  border-radius: 36px;
  background: rgba(255, 254, 250, 0.8);
  box-shadow: 0 20px 80px rgba(61, 56, 43, 0.055);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

.section-kicker {
  margin: 0 0 11px;
  color: var(--purple-dark);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.19em;
}

.section-heading h2,
.principles h2 {
  margin: 0;
  font-family: "Iowan Old Style", "Baskerville", "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(34px, 3.5vw, 45px);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.2;
}

.tool-result-count {
  margin: 0 0 5px;
  color: #96958f;
  font-size: 12px;
}

.tool-result-count strong {
  color: var(--ink);
  font-size: 15px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 34px 0 28px;
}

.filter-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  border: 1px solid rgba(32, 33, 36, 0.1);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.68);
  color: #686963;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.filter-button span {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 6px;
  background: #efeee8;
  color: #8b8b85;
  font-size: 9px;
}

.filter-button:hover {
  border-color: rgba(117, 103, 232, 0.3);
  color: var(--purple-dark);
  transform: translateY(-1px);
}

.filter-button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.filter-button.active span {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.tool-card {
  position: relative;
  display: flex;
  min-height: 244px;
  flex-direction: column;
  align-items: flex-start;
  padding: 21px;
  overflow: hidden;
  border: 1px solid rgba(32, 33, 36, 0.095);
  border-radius: 20px;
  background: var(--tool-bg, #f5f3ec);
  cursor: pointer;
  text-align: left;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.tool-card::after {
  position: absolute;
  right: -36px;
  bottom: -45px;
  width: 120px;
  height: 120px;
  border: 22px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  content: "";
  transition: transform 260ms ease;
}

.tool-card:hover,
.tool-card:focus-visible {
  z-index: 2;
  border-color: rgba(32, 33, 36, 0.2);
  outline: none;
  box-shadow: 0 18px 38px rgba(48, 45, 37, 0.12);
  transform: translateY(-5px);
}

.tool-card:hover::after,
.tool-card:focus-visible::after {
  transform: scale(1.15) rotate(10deg);
}

.tool-card.is-hidden {
  display: none;
}

.tool-card-top {
  z-index: 1;
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
}

.tool-icon,
.open-icon {
  display: grid;
  place-items: center;
}

.tool-icon {
  width: 45px;
  height: 45px;
  border: 1px solid rgba(32, 33, 36, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--tool-accent, var(--ink));
  box-shadow: 0 5px 15px rgba(39, 37, 31, 0.06);
}

.tool-icon svg {
  width: 21px;
  height: 21px;
}

.tool-icon .fill-dot {
  fill: currentColor;
  stroke: none;
}

.open-icon {
  width: 31px;
  height: 31px;
  border: 1px solid rgba(32, 33, 36, 0.09);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  color: #62635f;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.open-icon svg {
  width: 14px;
  height: 14px;
}

.tool-card:hover .open-icon {
  background: var(--ink);
  color: #fff;
  transform: rotate(5deg);
}

.tool-tag {
  z-index: 1;
  margin-top: 23px;
  color: var(--tool-accent, #6f706d);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.tool-card > strong {
  z-index: 1;
  margin-top: 7px;
  font-size: 19px;
  letter-spacing: -0.035em;
}

.tool-description {
  z-index: 1;
  max-width: 210px;
  margin-top: 8px;
  color: rgba(32, 33, 36, 0.62);
  font-size: 11px;
  line-height: 1.55;
}

.tool-meta {
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 17px;
  color: rgba(32, 33, 36, 0.5);
  font-size: 9px;
  font-weight: 650;
}

.tool-meta i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--tool-accent, #777);
}

.favorite-badge {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 8px 8px;
  border-radius: 0 0 8px 8px;
  background: var(--ink);
  color: #fff;
  font-size: 8px;
  font-weight: 750;
}

.favorite-badge svg {
  width: 10px;
  height: 10px;
}

.featured .open-icon {
  margin-top: 22px;
}

.card-yellow { --tool-bg: #fff1bf; --tool-accent: #946a00; }
.card-purple { --tool-bg: #e7e0ff; --tool-accent: #6553d3; }
.card-blue { --tool-bg: #dfeeff; --tool-accent: #3977ae; }
.card-mint { --tool-bg: #ddf3e6; --tool-accent: #3f865b; }
.card-coral { --tool-bg: #ffe0d5; --tool-accent: #af5f46; }
.card-sky { --tool-bg: #dff3f2; --tool-accent: #367d7c; }
.card-orange { --tool-bg: #ffe5bd; --tool-accent: #a86619; }
.card-green { --tool-bg: #e6f1ce; --tool-accent: #5f7d27; }
.card-indigo { --tool-bg: #e2e4fb; --tool-accent: #5c65b5; }
.card-pink { --tool-bg: #f9dfe8; --tool-accent: #a65472; }
.card-lilac { --tool-bg: #eee0f4; --tool-accent: #88559e; }
.card-lime { --tool-bg: #edf0c8; --tool-accent: #757b23; }

.no-results {
  padding: 70px 20px 30px;
  text-align: center;
}

.no-results[hidden] {
  display: none;
}

.no-results > span {
  display: grid;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  place-items: center;
  border-radius: 18px;
  background: #eeece5;
  color: #898984;
}

.no-results svg {
  width: 24px;
  height: 24px;
}

.no-results h3 {
  margin: 0;
  font-size: 18px;
}

.no-results p {
  margin: 9px 0 19px;
  color: var(--muted);
  font-size: 13px;
}

.no-results button {
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.principles {
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
  gap: 86px;
  width: min(1180px, calc(100% - 48px));
  margin: 90px auto;
  padding: 66px 70px;
  border-radius: 30px;
  background: #222422;
  color: #f8f7f1;
  box-shadow: 0 28px 70px rgba(32, 33, 31, 0.16);
}

.principles .section-kicker {
  color: #aba0ff;
}

.principles h2 {
  font-size: clamp(32px, 3vw, 42px);
  line-height: 1.35;
}

.principles-intro > p:last-child {
  max-width: 390px;
  margin: 20px 0 0;
  color: #a8aca7;
  font-size: 13px;
  line-height: 1.8;
}

.principle-list {
  display: flex;
  flex-direction: column;
}

.principle-list article {
  display: grid;
  grid-template-columns: 30px 45px 1fr;
  gap: 15px;
  align-items: center;
  padding: 21px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.principle-list article:first-child {
  padding-top: 0;
}

.principle-list article:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.principle-number {
  align-self: start;
  padding-top: 3px;
  color: #686c67;
  font-family: ui-monospace, monospace;
  font-size: 9px;
}

.principle-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
}

.principle-icon.purple { background: #3a354e; color: #b4a8ff; }
.principle-icon.green { background: #293e31; color: #86d39a; }
.principle-icon.coral { background: #49352f; color: #efa38b; }

.principle-icon svg {
  width: 19px;
  height: 19px;
}

.principle-list h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.principle-list p {
  margin: 0;
  color: #9ea29c;
  font-size: 11px;
  line-height: 1.6;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(1180px, calc(100% - 48px));
  min-height: 100px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.footer-brand .brand-mark {
  width: 30px;
  height: 30px;
  grid-template-columns: repeat(2, 6px);
  grid-template-rows: repeat(2, 6px);
  border-radius: 9px;
}

.site-footer > p {
  margin: 0;
  color: #777872;
  font-size: 11px;
  text-align: center;
}

.site-footer > p span {
  margin-left: 6px;
  color: #a6a59f;
}

.site-footer > a:last-child {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 7px;
  color: #646560;
  font-size: 11px;
  font-weight: 700;
}

.site-footer > a:last-child svg {
  width: 13px;
  height: 13px;
  transform: rotate(-45deg);
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: #efeee8;
  color: #73746f;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.icon-button:hover {
  background: #e3e1da;
  color: var(--ink);
  transform: rotate(4deg);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.tool-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 15px;
  border-radius: 11px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.done-button:hover,
.tool-button:hover {
  background: #363735;
  box-shadow: 0 7px 16px rgba(32, 33, 36, 0.14);
  transform: translateY(-1px);
}

.tool-button.secondary {
  border: 1px solid rgba(32, 33, 36, 0.12);
  background: #fff;
  color: #555651;
  box-shadow: none;
}

.tool-button.secondary:hover {
  border-color: rgba(117, 103, 232, 0.35);
  color: var(--purple-dark);
}

.tool-button.danger {
  background: #f5e8e4;
  color: #a25643;
}

.tool-layout {
  display: grid;
  gap: 16px;
}

.tool-layout.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tool-panel {
  padding: 18px;
  border: 1px solid rgba(32, 33, 36, 0.1);
  border-radius: 17px;
  background: #fff;
}

.tool-panel.tinted {
  background: #f7f5ef;
}

.tool-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 9px;
}

.tool-label,
.tool-label-row label {
  color: #555651;
  font-size: 11px;
  font-weight: 800;
}

.tool-hint,
.input-note {
  color: #999892;
  font-size: 9px;
}

.tool-textarea,
.tool-input,
.tool-select {
  width: 100%;
  border: 1px solid rgba(32, 33, 36, 0.12);
  outline: none;
  background: #fbfaf6;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.tool-textarea:focus,
.tool-input:focus,
.tool-select:focus {
  border-color: rgba(117, 103, 232, 0.62);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(117, 103, 232, 0.09);
}

.tool-textarea {
  min-height: 190px;
  padding: 13px 14px;
  resize: vertical;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.7;
}

.tool-textarea.code,
.tool-input.code,
.tool-output.code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.tool-input,
.tool-select {
  height: 44px;
  padding: 0 12px;
  border-radius: 11px;
  font-size: 12px;
}

.tool-select {
  cursor: pointer;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tool-actions.centered {
  justify-content: center;
}

.tool-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.stat-box {
  padding: 14px 10px;
  border-radius: 13px;
  background: #f1eee7;
  text-align: center;
}

.stat-box:nth-child(2n) {
  background: #efecff;
}

.stat-box strong,
.stat-box span {
  display: block;
}

.stat-box strong {
  margin-bottom: 4px;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.stat-box span {
  color: #7e7f79;
  font-size: 9px;
}

.tool-status {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  margin-top: 11px;
  padding: 8px 11px;
  border-radius: 10px;
  background: #eff6ef;
  color: #4f7e5a;
  font-size: 10px;
  font-weight: 650;
}

.tool-status.error {
  background: #faece8;
  color: #a55542;
}

.tool-status.neutral {
  background: #f1efe9;
  color: #7d7d77;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field-group {
  display: grid;
  gap: 7px;
}

.text-file-controls .field-group {
  min-width: 0;
}

.text-file-input {
  height: auto;
  min-height: 44px;
  padding: 10px;
}

#wc-status,
#text-diff-left-file-status,
#text-diff-right-file-status {
  overflow-wrap: anywhere;
}

.text-diff-file-controls {
  margin-bottom: 12px;
}

.field-group label {
  color: #696a65;
  font-size: 10px;
  font-weight: 750;
}

.live-time {
  padding: 25px 18px;
  border-radius: 16px;
  background: #252624;
  color: #fff;
  text-align: center;
}

.live-time strong,
.live-time span {
  display: block;
}

.live-time strong {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: clamp(25px, 5vw, 39px);
  letter-spacing: -0.045em;
}

.live-time span {
  margin-top: 6px;
  color: #aeb1ab;
  font-size: 10px;
}

.copy-field {
  display: flex;
  gap: 8px;
}

.copy-field .tool-input {
  min-width: 0;
  flex: 1;
}

.copy-field .tool-button {
  flex: none;
}

.password-result {
  width: 100%;
  padding: 17px;
  overflow-wrap: anywhere;
  border: 1px dashed rgba(117, 103, 232, 0.38);
  border-radius: 14px;
  background: #f0edff;
  color: #4e42b2;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 17px;
  line-height: 1.5;
  text-align: center;
  user-select: all;
}

.range-row {
  display: grid;
  grid-template-columns: 1fr 54px;
  gap: 12px;
  align-items: center;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--purple);
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.check-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 11px;
  border: 1px solid rgba(32, 33, 36, 0.1);
  border-radius: 10px;
  background: #faf9f5;
  color: #63645f;
  cursor: pointer;
  font-size: 10px;
  font-weight: 650;
}

.check-option input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--purple);
}

.strength-track {
  height: 6px;
  overflow: hidden;
  border-radius: 6px;
  background: #e4e2db;
}

.strength-track i {
  display: block;
  width: var(--strength, 25%);
  height: 100%;
  border-radius: inherit;
  background: var(--strength-color, #d17860);
  transition: width 180ms ease, background 180ms ease;
}

.case-buttons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.case-buttons .tool-button {
  min-width: 0;
  padding: 0 8px;
  font-size: 10px;
}

.color-workspace {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 17px;
}

.color-preview {
  position: relative;
  display: grid;
  min-height: 210px;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: var(--preview-color, #7c6cf2);
  box-shadow: inset 0 0 0 1px rgba(32, 33, 36, 0.08);
}

.color-preview input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.color-preview span {
  padding: 8px 11px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.88);
  color: #333;
  font-size: 10px;
  font-weight: 750;
  pointer-events: none;
}

.color-values {
  display: grid;
  gap: 9px;
}

.value-row {
  display: grid;
  grid-template-columns: 46px 1fr 42px;
  gap: 8px;
  align-items: center;
}

.value-row > span {
  color: #7e7f79;
  font-size: 9px;
  font-weight: 800;
}

.mini-copy {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(32, 33, 36, 0.1);
  border-radius: 10px;
  background: #f5f3ed;
  color: #777872;
  cursor: pointer;
}

.mini-copy:hover {
  color: var(--purple-dark);
}

.mini-copy svg {
  width: 15px;
  height: 15px;
}

.conversion-equals {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  margin: 0 auto;
  border-radius: 50%;
  background: #eeebff;
  color: var(--purple-dark);
  font-size: 18px;
  font-weight: 800;
}

.spaced-field {
  margin-top: 14px;
}

.tool-actions.no-margin {
  margin-top: 0;
}

.compact-textarea {
  min-height: 92px;
}

.tall-textarea,
.result-textarea {
  min-height: 320px;
}

.inline-check {
  width: fit-content;
  margin-top: 12px;
}

.diff-result-list {
  display: grid;
  max-height: 290px;
  gap: 7px;
  overflow-y: auto;
}

.diff-result-row {
  display: grid;
  grid-template-columns: 46px minmax(120px, 0.7fr) minmax(180px, 1.3fr);
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(32, 33, 36, 0.08);
  border-radius: 10px;
  background: #fff;
}

.diff-result-row > span {
  display: inline-grid;
  min-height: 24px;
  place-items: center;
  border-radius: 7px;
  font-size: 9px;
  font-weight: 800;
}

.diff-result-row code,
.diff-result-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diff-result-row code {
  color: #474844;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.diff-result-row small {
  color: #858680;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.diff-result-row.added > span {
  background: #e4f3e7;
  color: #39754a;
}

.diff-result-row.removed > span {
  background: #fae8e3;
  color: #9e4d3a;
}

.diff-result-row.changed > span {
  background: #eeeaff;
  color: #5f52bd;
}

.empty-result {
  margin: 0;
  padding: 24px;
  color: #777873;
  font-size: 11px;
  text-align: center;
}

.regex-fields {
  grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.55fr);
}

.flag-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.flag-options label {
  display: flex;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(32, 33, 36, 0.1);
  border-radius: 10px;
  background: #faf9f5;
  color: #646560;
  cursor: pointer;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.flag-options input {
  margin: 0;
  accent-color: var(--purple);
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.permission-group {
  display: grid;
  gap: 7px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(32, 33, 36, 0.1);
  border-radius: 12px;
  background: #faf9f5;
}

.permission-group legend {
  padding: 0 5px;
  color: #555651;
  font-size: 10px;
  font-weight: 800;
}

.permission-group label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 31px;
  padding: 0 8px;
  border-radius: 8px;
  color: #696a65;
  cursor: pointer;
  font-size: 9px;
}

.permission-group label:hover {
  background: #f0ede6;
}

.permission-group input {
  accent-color: var(--purple);
}

.chmod-results {
  display: grid;
  grid-template-columns: 0.65fr 1fr 1.8fr;
  gap: 9px;
}

.calculation-result,
.cron-summary {
  padding: 24px;
  border-radius: 17px;
  background: #252624;
  color: #fff;
  text-align: center;
}

.calculation-result span,
.calculation-result strong,
.cron-summary small,
.cron-summary strong {
  display: block;
}

.calculation-result span,
.cron-summary small {
  margin-bottom: 7px;
  color: #aeb1ab;
  font-size: 10px;
}

.calculation-result strong {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: clamp(28px, 5vw, 42px);
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}

.network-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.line-diff-output {
  min-height: 130px;
  max-height: 310px;
  overflow: auto;
  border: 1px solid rgba(32, 33, 36, 0.09);
  border-radius: 11px;
  background: #fff;
  font-family: "SFMono-Regular", Consolas, monospace;
}

.line-diff-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  min-height: 30px;
  border-bottom: 1px solid rgba(32, 33, 36, 0.06);
}

.line-diff-row:last-child {
  border-bottom: 0;
}

.line-diff-row > span {
  display: grid;
  place-items: center;
  background: #f1efe9;
  color: #a1a09a;
  font-size: 10px;
}

.line-diff-row code {
  padding: 6px 10px;
  color: #555651;
  font-size: 10px;
  white-space: pre-wrap;
}

.line-diff-row.added {
  background: #edf7ef;
}

.line-diff-row.added > span {
  background: #d8eddd;
  color: #39754a;
}

.line-diff-row.removed {
  background: #fdf0ed;
}

.line-diff-row.removed > span {
  background: #f4dcd6;
  color: #9e4d3a;
}

.cron-summary {
  text-align: left;
}

.cron-summary strong {
  font-size: 15px;
  line-height: 1.65;
}

.cron-field-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.cron-field-list > div {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 92px;
  padding: 11px;
  border: 1px solid rgba(32, 33, 36, 0.09);
  border-radius: 11px;
  background: #fff;
}

.cron-field-list span {
  color: #8b8b85;
  font-size: 8px;
  font-weight: 800;
}

.cron-field-list code {
  color: var(--purple-dark);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  font-weight: 750;
}

.cron-field-list small {
  color: #777873;
  font-size: 8px;
  line-height: 1.45;
}

.device-output {
  min-height: 430px;
}

.http-status-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 440px;
  gap: 8px;
  overflow-y: auto;
}

.http-status-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid rgba(32, 33, 36, 0.09);
  border-radius: 13px;
  background: #fff;
}

.http-status-row > strong {
  display: grid;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  background: #efecff;
  color: var(--purple-dark);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

.http-status-row.status-2 > strong { background: #e3f2e6; color: #39754a; }
.http-status-row.status-3 > strong { background: #e4effb; color: #3977ae; }
.http-status-row.status-4 > strong { background: #fff0cf; color: #946a00; }
.http-status-row.status-5 > strong { background: #fae5e0; color: #9e4d3a; }

.http-status-row h3 {
  margin: 0 0 3px;
  font-size: 11px;
}

.http-status-row p {
  margin: 0;
  color: #7d7d77;
  font-size: 9px;
  line-height: 1.45;
}

.markdown-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.markdown-editor {
  min-height: 315px;
}

.markdown-preview-panel {
  grid-column: 1 / -1;
}

.markdown-preview {
  width: 100%;
  min-height: 280px;
  border: 1px solid rgba(32, 33, 36, 0.1);
  border-radius: 11px;
  background: #fff;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 15px;
  border-radius: 12px;
  background: #252624;
  color: #fff;
  font-size: 11px;
  font-weight: 650;
  box-shadow: 0 16px 40px rgba(24, 24, 23, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Interactive workspaces share the homepage's visual language. */
.tool-workspace {
  display: grid;
  gap: 18px;
}

.tool-intro {
  margin: 0 0 2px;
  color: #777873;
  font-size: 12px;
  line-height: 1.65;
}

.field-group > label,
.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field-hint {
  color: #999892;
  font-size: 9px;
  font-weight: 500;
}

.tool-output {
  width: 100%;
  min-height: 152px;
  padding: 13px 14px;
  resize: vertical;
  border: 1px solid rgba(32, 33, 36, 0.12);
  border-radius: 12px;
  outline: none;
  background: #f3f1eb;
  color: #555651;
  font-size: 12px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.tool-textarea.mono,
.tool-input.mono,
.tool-output.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.primary-button,
.secondary-button,
.ghost-button,
.copy-button,
.format-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border-radius: 11px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.primary-button {
  border: 1px solid var(--purple);
  background: var(--purple);
  color: #fff;
}

.primary-button:hover {
  border-color: var(--purple-dark);
  background: var(--purple-dark);
  transform: translateY(-1px);
}

.secondary-button,
.format-button {
  border: 1px solid rgba(32, 33, 36, 0.12);
  background: #fff;
  color: #555651;
}

.secondary-button:hover,
.format-button:hover {
  border-color: rgba(117, 103, 232, 0.35);
  color: var(--purple-dark);
}

.ghost-button {
  background: transparent;
  color: #777873;
}

.ghost-button:hover {
  background: #f1efe9;
  color: var(--ink);
}

.copy-button {
  margin-left: auto;
  border: 1px solid #ddd7ff;
  background: #efecff;
  color: var(--purple-dark);
}

.copy-button:hover {
  background: #e4dfff;
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.split-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.output-card {
  padding: 15px;
  border: 1px solid rgba(32, 33, 36, 0.1);
  border-radius: 13px;
  background: #f3f1eb;
}

.output-card small,
.output-card strong {
  display: block;
}

.output-card small {
  margin-bottom: 6px;
  color: #8c8c86;
  font-size: 9px;
}

.output-card strong {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.error-message {
  min-height: 16px;
  margin: -5px 0 0;
  color: #ad513f;
  font-size: 10px;
}

.error-message:empty {
  display: none;
}

.options-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.range-value {
  display: grid;
  min-width: 54px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(32, 33, 36, 0.1);
  border-radius: 10px;
  background: #f3f1eb;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}

.password-output-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.strength-line {
  height: 6px;
  overflow: hidden;
  border-radius: 6px;
  background: #e4e2db;
}

.strength-line i {
  display: block;
  width: 25%;
  height: 100%;
  border-radius: inherit;
  background: #d17860;
  transition: width 180ms ease, background 180ms ease;
}

.format-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.format-button {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.color-controls {
  display: grid;
  gap: 10px;
}

.color-input-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
}

.color-input-row input[type="color"] {
  width: 48px;
  height: 44px;
  padding: 3px;
  border: 1px solid rgba(32, 33, 36, 0.12);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.color-value {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 8px 0 12px;
  border: 1px solid rgba(32, 33, 36, 0.1);
  border-radius: 10px;
  background: #f5f3ed;
}

.color-value > span {
  min-width: 0;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  overflow-wrap: anywhere;
}

.color-value .mini-copy {
  width: auto;
  height: 27px;
  padding: 0 8px;
  border: 0;
  background: #e9e5ff;
  color: var(--purple-dark);
  font-size: 9px;
}

.conversion-arrow {
  display: grid;
  width: 38px;
  height: 38px;
  margin: -2px auto;
  place-items: center;
  border-radius: 50%;
  background: #eeebff;
  color: var(--purple-dark);
  transform: rotate(90deg);
}

.conversion-arrow svg {
  width: 16px;
  height: 16px;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.clipboard-helper {
  position: fixed;
  top: -1000px;
  left: -1000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.toast svg {
  width: 15px;
  height: 15px;
  color: #93d6a3;
}

/* Multi-language code formatter */

.code-formatter-workspace {
  display: grid;
  gap: 15px;
}

.formatter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(32, 33, 36, 0.1);
  border-radius: 15px;
  background: #f2f0e9;
}

.formatter-language-tabs {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.formatter-language-tabs::-webkit-scrollbar {
  display: none;
}

.formatter-language-tab {
  flex: none;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #6e6f69;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.formatter-language-tab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.65);
}

.formatter-language-tab.active {
  border-color: rgba(117, 103, 232, 0.18);
  background: #fff;
  color: var(--purple-dark);
  box-shadow: 0 4px 12px rgba(42, 39, 35, 0.08);
}

.formatter-options {
  display: flex;
  flex: none;
  align-items: center;
  gap: 7px;
}

.formatter-option {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 5px 0 9px;
  border: 1px solid rgba(32, 33, 36, 0.1);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.72);
  color: #85857f;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.formatter-option select {
  height: 27px;
  padding: 0 20px 0 5px;
  border: 0;
  outline: none;
  background: transparent;
  color: #4f504c;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
}

.formatter-check {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid rgba(117, 103, 232, 0.2);
  border-radius: 9px;
  background: #ece8ff;
  color: var(--purple-dark);
  cursor: pointer;
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.formatter-check[hidden] {
  display: none;
}

.formatter-check input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--purple);
}

.formatter-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.formatter-pane {
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid rgba(32, 33, 36, 0.14);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(39, 37, 31, 0.04);
}

.formatter-output-pane {
  border-color: #343531;
  background: #242523;
  box-shadow: 0 12px 30px rgba(26, 26, 24, 0.12);
}

.formatter-pane-header,
.formatter-pane-footer {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 9px 13px;
  border-bottom: 1px solid rgba(32, 33, 36, 0.09);
  background: #fbfaf6;
}

.formatter-pane-header > div {
  display: grid;
  gap: 2px;
}

.formatter-pane-header label {
  color: #4d4e4a;
  font-size: 11px;
  font-weight: 800;
}

.formatter-pane-kicker {
  color: #aaa9a2;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.formatter-counter {
  color: #969690;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 8px;
  white-space: nowrap;
}

.formatter-editor {
  width: 100%;
  min-height: 350px;
  flex: 1;
  padding: 16px;
  resize: vertical;
  border: 0;
  border-radius: 0;
  outline: none;
  background: #fff;
  color: #343532;
  caret-color: var(--purple-dark);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.7;
  tab-size: 2;
  white-space: pre;
}

.formatter-editor:focus {
  box-shadow: inset 0 0 0 2px rgba(117, 103, 232, 0.28);
}

.formatter-output-pane .formatter-pane-header,
.formatter-output-pane .formatter-pane-footer {
  border-color: rgba(255, 255, 255, 0.08);
  background: #2c2d2a;
}

.formatter-output-pane .formatter-pane-header label {
  color: #eeece5;
}

.formatter-output-pane .formatter-pane-kicker,
.formatter-output-pane .formatter-counter {
  color: #888b84;
}

.formatter-output-pane .formatter-editor {
  background: #242523;
  color: #e7e4db;
  caret-color: #b6abff;
}

.formatter-pane-footer {
  min-height: 56px;
  border-top: 1px solid rgba(32, 33, 36, 0.09);
  border-bottom: 0;
}

.formatter-actions,
.formatter-text-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.formatter-actions .tool-button {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 9px;
  font-size: 10px;
}

.formatter-text-actions button,
.formatter-output-footer button,
.formatter-copy-button {
  padding: 5px 2px;
  background: transparent;
  color: #858680;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
  transition: color 160ms ease;
}

.formatter-text-actions button:hover,
.formatter-output-footer button:hover {
  color: var(--purple-dark);
}

.formatter-text-actions button + button::before {
  margin-right: 7px;
  color: #d1cfc7;
  content: "·";
}

.formatter-copy-button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(181, 170, 255, 0.25);
  border-radius: 8px;
  background: rgba(117, 103, 232, 0.15);
  color: #c8bfff;
}

.formatter-copy-button:hover {
  border-color: rgba(181, 170, 255, 0.48);
  background: rgba(117, 103, 232, 0.25);
  color: #fff;
}

.formatter-copy-button:disabled,
.formatter-output-footer button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.formatter-output-footer button {
  color: #aaa6c6;
}

.formatter-output-footer button:hover {
  color: #d0c9ff;
}

.formatter-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.formatter-status-row .tool-status {
  min-width: 230px;
  flex: 1;
  margin: 0;
}

.formatter-status-row > span {
  color: #8e8e88;
  font-size: 9px;
}

.formatter-status-row kbd {
  flex: none;
  width: auto;
  padding: 0 7px;
  white-space: nowrap;
}

:focus-visible {
  outline: 3px solid rgba(117, 103, 232, 0.3);
  outline-offset: 3px;
}

@media (max-width: 1080px) {
  .site-header { grid-template-columns: 1fr auto; }
  .main-nav { display: none; }
  .hero {
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 35px;
  }

  .hero h1 {
    font-size: 58px;
  }

  .tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .principles {
    gap: 55px;
    padding: 58px 50px;
  }
}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 68px;
    text-align: center;
  }

  .hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-description {
    margin-right: auto;
    margin-left: auto;
  }

  .search-wrap {
    width: min(590px, 100%);
  }

  .hero-visual {
    width: min(540px, 100%);
    margin: -15px auto 0;
  }

  .principles {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .principles-intro {
    text-align: center;
  }

  .principles-intro > p:last-child {
    margin-right: auto;
    margin-left: auto;
  }

  .formatter-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .formatter-options {
    flex-wrap: wrap;
  }
}

@media (max-width: 680px) {
  /* Decorative backgrounds must not widen the mobile document. */
  .page-glow {
    position: fixed;
  }

  .site-header,
  .hero,
  .principles,
  .site-footer {
    width: min(100% - 30px, 1180px);
  }

  .site-header {
    min-height: 70px;
  }

  .header-search span,
  .header-search kbd {
    display: none;
  }

  .header-search {
    width: 40px;
    padding: 0;
    justify-content: center;
  }

  .hero {
    min-height: auto;
    padding: 54px 0 72px;
  }

  .hero h1 {
    font-size: clamp(42px, 12vw, 54px);
  }

  .hero-description {
    font-size: 15px;
  }

  .search-wrap {
    height: 58px;
  }

  .search-shortcut {
    display: none;
  }

  .quick-links {
    justify-content: center;
  }

  .hero-visual {
    min-height: 420px;
    overflow: clip;
    transform: scale(0.92);
    transform-origin: center top;
  }

  .privacy-sticker {
    right: 5px;
  }

  .chip-color {
    left: 2px;
  }

  .tools-section {
    width: calc(100% - 16px);
    padding: 55px 17px 65px;
    border-radius: 26px;
  }

  .section-heading {
    align-items: flex-start;
  }

  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .tool-card {
    min-height: 225px;
    padding: 17px;
  }

  .tool-description {
    font-size: 10px;
  }

  .principles {
    margin: 64px auto;
    padding: 45px 24px;
    border-radius: 24px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .site-footer > p {
    display: none;
  }

  .tool-layout.two-column,
  .field-grid,
  .split-fields,
  .color-workspace,
  .formatter-editor-grid,
  .regex-fields,
  .permission-grid,
  .chmod-results,
  .network-results,
  .http-status-list,
  .markdown-grid {
    grid-template-columns: 1fr;
  }

  .markdown-preview-panel {
    grid-column: auto;
  }

  .cron-field-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .formatter-editor {
    min-height: 260px;
  }

  .formatter-status-row > span,
  .formatter-status-row > kbd {
    display: none;
  }

  .stat-grid,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-buttons,
  .format-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .color-preview {
    min-height: 150px;
  }
}

@media (max-width: 430px) {
  .language-label-full { display: none; }
  .language-label-short { display: inline; }
  .brand-name {
    font-size: 15px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-visual {
    min-height: 390px;
    width: 100%;
  }

  .workspace-card {
    width: calc(100% - 32px);
  }

  .chip-json {
    right: 0;
  }

  .chip-color {
    display: none;
  }

  .privacy-sticker {
    right: 0;
    bottom: 14px;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .tool-card {
    min-height: 218px;
  }

  .section-heading h2 {
    font-size: 34px;
  }

  .tool-result-count {
    display: none;
  }

  .filters {
    flex-wrap: nowrap;
    margin-right: -17px;
    margin-left: -2px;
    padding-right: 17px;
    padding-bottom: 4px;
    overflow-x: auto;
  }

  .filter-button {
    flex: none;
  }

  .principle-list article {
    grid-template-columns: 24px 40px 1fr;
    gap: 11px;
  }

  .copy-field {
    flex-direction: column;
  }

  .check-grid {
    grid-template-columns: 1fr;
  }

  .formatter-pane-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .formatter-output-footer {
    align-items: center;
    flex-direction: row;
  }

  .formatter-actions {
    width: 100%;
  }

  .formatter-actions .tool-button {
    min-width: 0;
    flex: 1;
  }

  .diff-result-row {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .diff-result-row small {
    grid-column: 1 / -1;
    padding: 0 4px 4px;
    white-space: normal;
  }

  .cron-field-list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.brand-region { display: block; margin-top: 3px; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.country-intro { width: min(1180px, calc(100% - 40px)); margin: 0 auto 32px; padding: 22px 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); line-height: 1.8; }
.country-intro h2 { margin: 0 0 8px; font-size: 21px; }
.country-intro p { margin: 0; color: var(--muted); }
