:root {
  color-scheme: light;
  --background: oklch(97.3% .004 247);
  --surface: #fff;
  --foreground: oklch(24% .03 258);
  --muted: oklch(48% .03 255);
  --primary: oklch(49% .09 222);
  --primary-hover: oklch(43% .085 222);
  --primary-soft: oklch(94% .03 215);
  --border: oklch(90% .012 250);
  --ink: oklch(24% .03 258);
  --warning-soft: oklch(96% .045 85);
  --warning-foreground: oklch(38% .07 65);
  --shadow-card: 0 1px 2px oklch(24% .03 258 / .05), 0 12px 32px -16px oklch(24% .03 258 / .14);
  --shadow-lift: 0 2px 4px oklch(24% .03 258 / .06), 0 24px 48px -20px oklch(24% .03 258 / .25);
  --radius: 14px;
  --font-sans: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --max-width: 68rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--background); color: var(--foreground); font-family: var(--font-sans); font-size: 1rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-underline-offset: 4px; }
a:hover { color: var(--primary-hover); }
button, input, textarea, select { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin-top: 0; font-family: var(--font-display); letter-spacing: -.025em; line-height: 1.12; text-wrap: balance; }
p { margin-top: 0; }
.container { width: min(var(--max-width), calc(100% - 2.5rem)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; top: .75rem; left: .75rem; padding: .65rem 1rem; border-radius: 999px; background: var(--surface); color: var(--foreground); box-shadow: var(--shadow-card); text-decoration: none; transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.site-header { position: sticky; z-index: 40; top: 0; border-bottom: 1px solid rgba(225, 229, 233, .78); background: rgba(246, 247, 248, .88); backdrop-filter: blur(14px); }
.header-inner { display: flex; min-height: 4rem; align-items: center; justify-content: space-between; gap: .75rem 1rem; min-width: 0; }
.brand { color: var(--foreground); font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; letter-spacing: -.045em; text-decoration: none; white-space: nowrap; flex: 0 1 auto; min-width: 0; }
.brand:hover { color: var(--foreground); }
.brand span { color: var(--primary); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .25rem; min-width: 0; }
.site-nav > a { padding: .55rem 1rem; border-radius: 999px; color: var(--muted); font-size: .9rem; font-weight: 500; text-decoration: none; }
.site-nav > a:hover { background: rgba(40, 109, 131, .06); color: var(--foreground); }
.site-nav > a[aria-current="page"] { background: var(--primary-soft); color: var(--foreground); }
.lang-switcher { display: inline-flex; align-items: center; gap: .15rem; padding: .18rem; margin-left: .5rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.lang-switcher a { display: inline-flex; align-items: center; justify-content: center; padding: .26rem .52rem; border-radius: 999px; color: var(--muted); font-size: .75rem; font-weight: 700; line-height: 1; text-decoration: none; }
.lang-switcher a:hover { color: var(--foreground); background: rgba(40, 109, 131, .08); }
.lang-switcher a[aria-current="true"] { background: var(--primary); color: #fff; }
.mobile-menu { display: none; position: relative; flex: 0 0 auto; }
.mobile-menu summary { cursor: pointer; list-style: none; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); padding: .48rem .95rem; font-size: .9rem; font-weight: 600; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu nav { position: absolute; top: calc(100% + .75rem); right: 0; z-index: 45; display: grid; width: min(18rem, calc(100vw - 2rem)); gap: .2rem; padding: .55rem; border: 1px solid var(--border); border-radius: 1rem; background: var(--surface); box-shadow: var(--shadow-lift); }
.mobile-menu nav a { padding: .7rem .8rem; border-radius: .65rem; color: var(--foreground); font-size: .92rem; text-decoration: none; }
.mobile-menu nav a:hover, .mobile-menu nav a[aria-current="page"] { background: var(--primary-soft); }
.mobile-lang-switcher { display: flex; align-items: center; gap: .35rem; padding-top: .5rem; margin-top: .4rem; border-top: 1px solid var(--border); }
.mobile-lang-switcher a { flex: 1; text-align: center; padding: .45rem .4rem; font-size: .82rem; font-weight: 600; border-radius: .5rem; }
.mobile-lang-switcher a[aria-current="true"] { background: var(--primary); color: #fff; }

.page { min-height: 60vh; padding: 3rem 0 1rem; }
.kicker { margin: 0 0 .35rem; color: var(--primary); font-family: var(--font-sans); font-size: .72rem; font-weight: 700; letter-spacing: .14em; line-height: 1.4; text-transform: uppercase; }
h1 { margin: 0 0 .7rem; font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -.045em; }
.lead { max-width: 42rem; margin: 0 0 1.4rem; color: var(--muted); font-size: 1.08rem; line-height: 1.75; }
.tool, article, .home-grid a { min-width: 0; border: 1px solid var(--border); border-radius: 1rem; background: var(--surface); box-shadow: var(--shadow-card); }
.tool { max-width: 40rem; padding: 1.25rem 1.3rem 1.4rem; margin-bottom: 1.25rem; }
article { max-width: 48rem; padding: 1.4rem 1.45rem 1.6rem; margin-bottom: 1rem; }
article h2 { margin: 2rem 0 .65rem; font-size: 1.45rem; }
article h2:first-child { margin-top: 0; }
article h3 { margin: 1.2rem 0 .35rem; font-size: 1.05rem; }
article p, article li { color: var(--muted); line-height: 1.75; }
article strong { color: var(--foreground); }
label { display: grid; gap: .35rem; margin: .85rem 0; font-size: .9rem; font-weight: 600; }
input, textarea, select { width: 100%; min-width: 0; max-width: 100%; border: 1px solid var(--border); border-radius: .7rem; background: var(--background); padding: .7rem .85rem; color: var(--foreground); }
input:focus, textarea:focus, select:focus { border-color: var(--primary); outline: 3px solid rgba(40, 109, 131, .14); }
textarea { min-height: 8rem; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: auto; max-width: none; padding: 0; border: 0; background: transparent; }
.check, label:has(> input[type="checkbox"]) { display: flex; align-items: center; gap: .55rem; font-weight: 500; }
.check input { width: auto; }
button { display: inline-flex; min-height: 2.65rem; align-items: center; justify-content: center; border: 0; border-radius: 999px; background: var(--primary); color: #fff; padding: .62rem 1.2rem; font-size: .9rem; font-weight: 600; cursor: pointer; }
button:hover { background: var(--primary-hover); color: #fff; box-shadow: 0 5px 16px rgba(40, 109, 131, .18); }
.result, .error { white-space: pre-wrap; overflow-wrap: anywhere; }
.result { margin: .9rem 0 0; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; background: var(--primary-soft); border-radius: .8rem; padding: .85rem 1rem; color: var(--foreground); }
.result-main { display: block; margin-bottom: .35rem; font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.result-secret { display: block; margin-bottom: .35rem; font-size: 1.05rem; letter-spacing: .04em; overflow-wrap: anywhere; }
.result div { display: flex; justify-content: space-between; gap: 1rem; padding: .42rem 0; border-top: 1px solid rgba(40, 109, 131, .16); }
.result div:first-child { border-top: 0; padding-top: 0; }
.result div strong { font-variant-numeric: tabular-nums; }
.result:empty, .error:empty { display: none; }
.error { margin: .8rem 0 0; padding: .75rem .9rem; border-radius: .8rem; background: var(--warning-soft); color: var(--warning-foreground); }
.fancy { display: grid; gap: .55rem; margin-top: .9rem; }
.fancy p { margin: 0; padding: .7rem .85rem; border-radius: .75rem; background: var(--background); color: var(--foreground); overflow-wrap: anywhere; }
.fancy strong { display: block; margin-bottom: .2rem; color: var(--primary); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.formula { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; background: var(--primary-soft); padding: .7rem .85rem; border-radius: .7rem; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 0 0 1rem; }
.home-grid a { display: block; padding: 1.15rem 1.15rem 1.2rem; text-decoration: none; color: inherit; transition: box-shadow .2s ease, transform .2s ease; }
.home-grid a:hover { box-shadow: var(--shadow-lift); transform: translateY(-3px); color: inherit; }
.home-grid strong { display: block; font-family: var(--font-display); font-size: 1.3rem; margin-bottom: .35rem; }
.home-grid span { color: var(--muted); }
.tool svg { display: block; width: min(100%, 16rem); height: auto; margin: 1rem auto 0; background: #fff; border: 1px solid var(--border); border-radius: .8rem; }
article ul, article ol { margin: .35rem 0 1rem; padding-left: 1.2rem; }

.site-footer { margin-top: 6rem; border-top: 1px solid var(--border); background: var(--surface); }
.footer-bottom p { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 auto; padding: 1.15rem 0; color: var(--muted); font-size: .8rem; }
.footer-bottom a { color: inherit; font-weight: 600; text-decoration: none; white-space: nowrap; }
.footer-bottom a:hover { color: var(--primary); }

@media (min-width: 960px) {
  .page > .container:has(.tool) {
    display: grid;
    grid-template-columns: minmax(18rem, 24rem) minmax(0, 1fr);
    column-gap: 1.5rem;
    align-items: start;
  }
  .page > .container:has(.tool) > :is(.kicker, h1, .lead) { grid-column: 1 / -1; }
  .tool { position: sticky; top: 5.25rem; max-width: none; max-height: calc(100vh - 6.5rem); margin-bottom: 0; overflow: auto; }
  article { max-width: none; }
}
@media (max-width: 767px) {
  .container { width: min(var(--max-width), calc(100% - 2rem)); }
  .site-nav { display: none; }
  .mobile-menu { display: block; }
  .page { padding-top: 2.2rem; }
  .home-grid { grid-template-columns: 1fr; }
  .tool button { width: 100%; }
  .footer-bottom p { align-items: flex-start; flex-direction: column; gap: .35rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
