:root {
  --bg: #f4f2ec;
  --surface: #fffefb;
  --surface-2: #eeece5;
  --ink: #191725;
  --muted: #706d79;
  --line: #dcd8cf;
  --purple: #7657ff;
  --purple-dark: #5d42e8;
  --lime: #d8ff65;
  --coral: #ff765f;
  --sky: #62c7ff;
  --radius: 20px;
  --shadow: 0 18px 50px rgba(35, 30, 65, .08);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

[data-theme="dark"] {
  --bg: #121116;
  --surface: #1c1a22;
  --surface-2: #26232d;
  --ink: #f4f0e8;
  --muted: #aaa5b3;
  --line: #383440;
  --shadow: 0 18px 50px rgba(0, 0, 0, .24);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 15px/1.55 var(--font); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.grain { position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .026; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

.topbar { height: 74px; position: sticky; top: 0; z-index: 50; display: grid; grid-template-columns: 230px minmax(280px, 600px) 1fr; align-items: center; gap: 24px; padding: 0 28px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 87%, transparent); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; width: max-content; }
.brand-glyph { width: 39px; height: 39px; display: grid; place-items: center; position: relative; overflow: hidden; border-radius: 12px; background: var(--ink); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.brand-glyph i { position: absolute; width: 15px; height: 3px; border-radius: 5px; background: var(--lime); transform-origin: left center; }
.brand-glyph i:nth-child(1) { transform: rotate(-58deg) translate(3px, 1px); }
.brand-glyph i:nth-child(2) { transform: rotate(0deg) translate(0, 0); }
.brand-glyph i:nth-child(3) { transform: rotate(58deg) translate(3px, -1px); }
.brand strong { display: block; font-size: 19px; letter-spacing: -.05em; line-height: 1; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font: 8px/1 var(--mono); letter-spacing: .22em; }
.search-trigger { min-width: 280px; height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 14px; color: var(--muted); cursor: pointer; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 4px 18px rgba(30,25,50,.03); }
.search-trigger:hover { border-color: color-mix(in srgb, var(--purple) 50%, var(--line)); }
.search-icon { color: var(--purple); font-size: 22px; transform: translateY(-1px); }
.search-trigger kbd { margin-left: auto; }
kbd { padding: 2px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: var(--surface-2); font: 11px var(--mono); box-shadow: 0 1px 0 var(--line); }
.top-actions { justify-self: end; display: flex; align-items: center; gap: 9px; }
.privacy-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; background: var(--surface); }
.privacy-pill i, .privacy-inline i { width: 7px; height: 7px; border-radius: 50%; background: #54c86d; box-shadow: 0 0 0 4px rgba(84, 200, 109, .13); }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.icon-button:hover { border-color: var(--purple); color: var(--purple); }
.menu-toggle { display: none; }

.shell { max-width: 1500px; min-height: calc(100vh - 74px); margin: 0 auto; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.sidebar { position: sticky; top: 74px; height: calc(100vh - 74px); padding: 32px 20px 24px; border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow-y: auto; background: var(--bg); scrollbar-width: thin; }
.nav-block + .nav-block { margin-top: 26px; }
.nav-label { margin: 0 10px 10px; color: var(--muted); font: 10px var(--mono); letter-spacing: .17em; }
.nav-item { width: 100%; min-height: 43px; display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 7px; padding: 7px 10px; margin: 2px 0; border: 0; border-radius: 10px; background: transparent; cursor: pointer; text-align: left; }
.nav-item:hover { background: var(--surface-2); }
.nav-item.active { color: #fff; background: var(--ink); }
[data-theme="dark"] .nav-item.active { color: #17151e; background: #f4f0e8; }
.nav-icon { width: 25px; color: var(--purple); font: 12px var(--mono); text-align: center; }
.nav-item.active .nav-icon { color: var(--lime); }
.nav-item b { font-size: 13px; font-weight: 650; white-space: nowrap; }
.nav-item em { color: var(--muted); font: 8px var(--mono); letter-spacing: .1em; font-style: normal; }
.nav-item.active em { color: color-mix(in srgb, var(--lime) 78%, white); }
.sidebar-foot { margin-top: auto; padding: 16px 10px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: var(--muted); font: 9px var(--mono); letter-spacing: .09em; }

.main { min-width: 0; padding: 42px clamp(28px, 5vw, 76px) 0; }
.view { display: none; animation: view-in .34s ease; }
.view.active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hero { min-height: 450px; display: grid; grid-template-columns: 1.35fr .65fr; gap: 42px; align-items: center; padding: 45px 0 64px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--purple); font: 11px var(--mono); letter-spacing: .15em; font-weight: 700; }
.eyebrow i { width: 22px; height: 2px; background: var(--purple); }
.hero h1 { margin: 19px 0 22px; font-size: clamp(52px, 6.8vw, 92px); line-height: .93; letter-spacing: -.075em; font-weight: 760; }
.hero h1 span { color: var(--purple); }
.hero-copy > p { max-width: 610px; margin: 0; color: var(--muted); font-size: 17px; }
.hero-actions { display: flex; gap: 12px; margin-top: 32px; }
.primary, .secondary, .quiet, .copy-button { min-height: 42px; border-radius: 11px; padding: 0 17px; cursor: pointer; font-weight: 700; transition: .18s ease; }
.primary { color: #fff; border: 1px solid var(--ink); background: var(--ink); box-shadow: 0 8px 24px rgba(25,23,37,.15); }
[data-theme="dark"] .primary { color: #17151e; }
.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(25,23,37,.22); }
.primary span { margin-left: 20px; color: var(--lime); }
.secondary { border: 1px solid var(--line); background: var(--surface); }
.secondary:hover, .copy-button:hover { border-color: var(--purple); color: var(--purple); }
.quiet { border: 1px solid transparent; background: transparent; color: var(--muted); }
.quiet:hover { color: var(--purple); background: color-mix(in srgb, var(--purple) 7%, transparent); }
.copy-button { min-height: 34px; padding: 0 12px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 12px; }
.full { width: 100%; }
.push { margin-left: auto; }
.hero-card { width: min(100%, 330px); aspect-ratio: 1; justify-self: end; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 28px; color: #fff; border-radius: 34px; background: #191725; box-shadow: 0 28px 80px rgba(45, 35, 100, .23); transform: rotate(2deg); }
.hero-card::before { content: ""; position: absolute; width: 170px; height: 170px; top: -34px; right: -28px; border-radius: 50%; background: var(--purple); filter: blur(1px); }
.orbit { position: absolute; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; }
.orbit.one { width: 250px; height: 250px; top: -72px; right: -67px; }
.orbit.two { width: 208px; height: 208px; top: -51px; right: -46px; }
.hero-spark { position: absolute; top: 52px; right: 52px; width: 52px; height: 52px; z-index: 2; display: grid; place-items: center; color: #191725; border-radius: 16px; background: var(--lime); transform: rotate(8deg); }
.hero-spark span { font-size: 28px; }
.hero-card strong { position: relative; font-size: 55px; line-height: 1; letter-spacing: -.06em; }
.hero-card p { position: relative; margin: 9px 0 32px; color: #b8b4c5; }
.hero-card-foot { position: relative; display: flex; justify-content: space-between; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.13); color: var(--lime); font: 8px var(--mono); letter-spacing: .14em; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin: 10px 0 25px; }
.section-kicker { color: var(--purple); font: 10px var(--mono); letter-spacing: .16em; }
.section-head h2 { margin: 5px 0 0; font-size: clamp(31px, 4vw, 48px); letter-spacing: -.045em; }
.section-head > p { color: var(--muted); font-size: 12px; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.tool-card { min-height: 294px; position: relative; display: flex; flex-direction: column; padding: 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); transition: transform .22s, box-shadow .22s; }
.tool-card:hover { z-index: 2; transform: translateY(-4px); box-shadow: var(--shadow); }
.tool-card.feature { grid-column: span 2; background: linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--purple) 8%, var(--surface))); }
.card-index { color: var(--muted); font: 10px var(--mono); }
.favorite { position: absolute; right: 18px; top: 16px; border: 0; background: transparent; color: var(--muted); font-size: 23px; cursor: pointer; }
.favorite.active { color: var(--purple); }
.card-icon { width: 53px; height: 53px; display: grid; place-items: center; margin: 29px 0 17px; border-radius: 15px; color: #191725; font: 16px var(--mono); font-weight: 800; transform: rotate(-2deg); }
.violet { background: #bbaeff; }.lime { background: var(--lime); }.coral { background: #ffb2a5; }.sky { background: #a7e2ff; }.amber { background: #ffd289; }.pink { background: #ffabd5; }.green { background: #a8efbd; }.blue { background: #adbbff; }
.tool-card h3 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.tool-card p { max-width: 330px; margin: 9px 0 22px; color: var(--muted); }
.card-link { width: 100%; margin-top: auto; display: flex; justify-content: space-between; padding: 12px 0 0; border: 0; border-top: 1px solid var(--line); background: transparent; cursor: pointer; text-align: left; font-weight: 700; }
.card-link span { color: var(--purple); }
.promise-strip { margin: 75px 0 100px; display: grid; grid-template-columns: repeat(3, 1fr); border-radius: var(--radius); background: var(--ink); color: #fff; overflow: hidden; }
[data-theme="dark"] .promise-strip { color: #17151e; background: #f4f0e8; }
.promise-strip > div { position: relative; padding: 27px; border-right: 1px solid rgba(255,255,255,.15); }
[data-theme="dark"] .promise-strip > div { border-color: rgba(0,0,0,.12); }
.promise-strip > div:last-child { border: 0; }
.promise-strip span { position: absolute; top: 15px; right: 18px; color: var(--lime); font: 11px var(--mono); }
[data-theme="dark"] .promise-strip span { color: var(--purple); }
.promise-strip strong { font-size: 17px; }
.promise-strip p { margin: 7px 0 0; color: #aaa6b6; font-size: 12px; }
[data-theme="dark"] .promise-strip p { color: #686471; }

.tool-view { max-width: 1120px; margin: 0 auto; min-height: calc(100vh - 230px); padding: 24px 0 90px; }
.tool-head { min-height: 210px; display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; padding-bottom: 36px; }
.tool-head h1 { margin: 11px 0 10px; font-size: clamp(45px, 6vw, 72px); line-height: .95; letter-spacing: -.065em; }
.tool-head p { margin: 0; color: var(--muted); font-size: 16px; }
.star-tool { align-self: center; border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; background: var(--surface); color: var(--muted); cursor: pointer; }
.star-tool.active { color: var(--purple); border-color: var(--purple); }
.work-grid { display: grid; gap: 18px; }
.work-grid.split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.work-grid.compact { margin-top: 18px; }
.panel { min-width: 0; padding: 25px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.accent-panel { box-shadow: inset 0 4px 0 var(--lime), var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.panel-head h2 { margin: 0; font-size: 17px; }
.panel-head > span { color: var(--muted); font: 10px var(--mono); letter-spacing: .08em; }
label { display: grid; gap: 7px; margin-bottom: 16px; color: var(--muted); font-size: 12px; }
input, select, textarea { width: 100%; color: var(--ink); border: 1px solid var(--line); border-radius: 11px; outline: none; background: var(--bg); }
input, select { min-height: 43px; padding: 0 12px; }
textarea { padding: 14px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px color-mix(in srgb, var(--purple) 14%, transparent); background: var(--surface); }
.large-input { min-height: 265px; }
.code-input { min-height: 380px; font: 13px/1.65 var(--mono); tab-size: 2; }
.code-input.short { min-height: 180px; }
.inline-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.check { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 8px; margin: 0; cursor: pointer; }
.check input { width: 16px; min-height: 16px; accent-color: var(--purple); }
.action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 16px; }
.action-grid button { min-height: 38px; cursor: pointer; color: var(--muted); border: 1px solid var(--line); border-radius: 9px; background: transparent; }
.action-grid button:hover { color: var(--purple); border-color: var(--purple); }
.status { padding: 5px 10px; border-radius: 999px; }
.status.good { color: #218443; background: rgba(84, 200, 109, .15); }
.status.bad { color: #cf3e35; background: rgba(255, 118, 95, .15); }
.error-box { margin-top: 16px; padding: 12px 14px; color: #c73d34; border: 1px solid rgba(255,118,95,.35); border-radius: 10px; background: rgba(255,118,95,.08); font: 12px/1.5 var(--mono); }
.control-line { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.control-line label { min-width: 210px; }
.segmented { display: flex; padding: 3px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.segmented button { min-height: 34px; padding: 0 16px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; color: var(--muted); }
.segmented button.active { color: #fff; background: var(--purple); }
.live-time { padding: 10px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font: 11px var(--mono); }
.result-list { margin-top: 20px; border-top: 1px solid var(--line); }
.result-list > div, .color-results > div { display: grid; grid-template-columns: 85px 1fr auto; align-items: center; gap: 10px; min-height: 55px; border-bottom: 1px solid var(--line); }
.result-list span, .color-results span { color: var(--muted); font-size: 11px; }
.result-list code, .color-results code { min-width: 0; overflow: hidden; text-overflow: ellipsis; font: 12px var(--mono); }
.result-list button, .color-results button, .password-output button { border: 0; background: transparent; color: var(--purple); cursor: pointer; font-size: 11px; }
.date-display { min-height: 188px; margin-top: 20px; padding: 23px; display: flex; flex-direction: column; justify-content: center; border-radius: 14px; background: var(--ink); color: #fff; }
[data-theme="dark"] .date-display { color: #17151e; background: #f4f0e8; }
.date-display span { color: var(--lime); font: 9px var(--mono); letter-spacing: .13em; }
[data-theme="dark"] .date-display span { color: var(--purple); }
.date-display strong { margin: 16px 0 8px; font-size: 22px; }
.date-display small { opacity: .62; font: 10px var(--mono); word-break: break-all; }
.unit-tabs { display: flex; gap: 4px; padding-bottom: 22px; margin-bottom: 25px; border-bottom: 1px solid var(--line); }
.unit-tabs button { padding: 8px 17px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.unit-tabs button.active { color: #fff; background: var(--purple); }
.converter { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; }
.converter > div { display: grid; grid-template-columns: 1fr 130px; gap: 8px; }
.converter input { min-height: 72px; font: 28px var(--mono); }
.swap-button { width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-2); color: var(--purple); cursor: pointer; font-size: 20px; }
.conversion-note { margin: 22px 0 0; color: var(--muted); text-align: center; font: 11px var(--mono); }
.color-layout { grid-template-columns: .85fr 1.15fr; }
.color-preview { min-height: 420px; padding: 27px; display: flex; flex-direction: column; justify-content: space-between; border-radius: var(--radius); background: #7657ff; color: #191725; box-shadow: var(--shadow); }
.color-preview span { font: 10px var(--mono); letter-spacing: .14em; }
.color-preview strong { font-size: 120px; line-height: .8; letter-spacing: -.09em; }
.color-preview small { opacity: .7; }
.color-field { display: grid; grid-template-columns: 56px 1fr; gap: 9px; }
.color-field input[type="color"] { padding: 5px; cursor: pointer; }
.color-results { margin-top: 27px; border-top: 1px solid var(--line); }
.result-code { min-height: 195px; padding: 15px; overflow: auto; white-space: pre-wrap; word-break: break-all; border: 1px solid var(--line); border-radius: 11px; background: var(--bg); font: 12px/1.7 var(--mono); }
.password-output { min-height: 88px; display: flex; align-items: center; gap: 10px; padding: 17px; border-radius: 13px; background: var(--ink); color: #fff; }
[data-theme="dark"] .password-output { color: #17151e; background: #f4f0e8; }
.password-output code { min-width: 0; flex: 1; word-break: break-all; font: 15px var(--mono); }
.range-row { margin-top: 22px; }
.range-row span { display: flex; justify-content: space-between; align-items: center; }
.range-row b { color: var(--ink); font: 20px var(--mono); }
.range-row input { min-height: auto; padding: 0; accent-color: var(--purple); }
.check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 18px 0 22px; }
.privacy-inline { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; color: var(--muted); font-size: 11px; }
.hash-output { margin-top: 22px; padding: 18px; display: grid; grid-template-columns: 90px 1fr auto; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 13px; background: var(--bg); }
.hash-output span { color: var(--muted); font: 9px var(--mono); letter-spacing: .1em; }
.hash-output code { min-width: 0; overflow-wrap: anywhere; font: 12px var(--mono); }
.regex-line { display: grid; grid-template-columns: auto 1fr auto 72px; align-items: center; gap: 7px; margin-bottom: 18px; color: var(--purple); font: 21px var(--mono); }
.regex-line input { font: 13px var(--mono); }
.regex-highlight { min-height: 125px; margin-bottom: 16px; padding: 15px; white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: 11px; background: var(--bg); font: 13px/1.7 var(--mono); }
.regex-highlight mark { padding: 1px 2px; border-radius: 3px; color: #191725; background: var(--lime); }
.markdown-grid .panel { min-height: 540px; }
.markdown-preview { min-height: 430px; overflow-wrap: anywhere; }
.markdown-preview > :first-child { margin-top: 0; }
.markdown-preview h1, .markdown-preview h2, .markdown-preview h3 { line-height: 1.2; letter-spacing: -.035em; }
.markdown-preview h1 { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.markdown-preview p, .markdown-preview li { color: var(--muted); }
.markdown-preview code { padding: 2px 6px; border-radius: 5px; background: var(--surface-2); font: 12px var(--mono); }
.markdown-preview pre { padding: 15px; overflow: auto; border-radius: 11px; background: var(--ink); color: var(--lime); }
.markdown-preview blockquote { margin-left: 0; padding-left: 16px; border-left: 3px solid var(--purple); }
.markdown-preview a { color: var(--purple); }
.base-panel { display: grid; grid-template-columns: 1fr 220px auto; align-items: end; gap: 12px; }
.base-panel > label { margin: 0; }
.base-results { grid-column: 1/-1; margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.base-results > div { min-height: 83px; display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 10px; padding: 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.base-results span { color: var(--purple); font: 10px var(--mono); }
.base-results code { min-width: 0; overflow-wrap: anywhere; font: 15px var(--mono); }
.base-results button { border: 0; background: transparent; color: var(--purple); cursor: pointer; font-size: 11px; }
.duration-display { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 25px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.duration-display > div { min-height: 135px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-right: 1px solid var(--line); background: var(--bg); }
.duration-display > div:last-child { border: 0; }
.duration-display strong { font-size: clamp(32px, 5vw, 56px); line-height: 1; letter-spacing: -.06em; }
.duration-display span { margin-top: 10px; color: var(--muted); font: 9px var(--mono); letter-spacing: .12em; }
.gradient-preview { min-height: 420px; padding: 27px; display: flex; flex-direction: column; justify-content: space-between; border-radius: var(--radius); background: linear-gradient(135deg, #7657ff, #d8ff65); color: #fff; box-shadow: var(--shadow); }
.gradient-preview span { font: 10px var(--mono); letter-spacing: .14em; }
.gradient-preview strong { font-size: clamp(70px, 10vw, 125px); line-height: .8; letter-spacing: -.09em; text-shadow: 0 5px 30px rgba(0,0,0,.18); }

footer { min-height: 120px; margin-top: 20px; display: flex; align-items: center; gap: 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
footer p { margin-left: auto; }
.brand.mini { transform: scale(.87); transform-origin: left center; }

.search-dialog { position: fixed; inset: 0; z-index: 100; display: grid; place-items: start center; padding-top: min(14vh, 120px); }
.dialog-backdrop { position: absolute; inset: 0; border: 0; background: rgba(15, 13, 22, .56); backdrop-filter: blur(7px); }
.search-box { width: min(620px, calc(100vw - 28px)); position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 30px 100px rgba(0,0,0,.3); }
.search-input-wrap { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.search-input-wrap > span { color: var(--purple); font-size: 26px; }
.search-input-wrap input { border: 0; min-height: 40px; padding: 0; background: transparent; box-shadow: none; font-size: 17px; }
.search-results { max-height: 390px; overflow: auto; padding: 8px; }
.search-result { width: 100%; min-height: 57px; display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 9px; padding: 8px 11px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; text-align: left; }
.search-result:hover, .search-result.selected { background: var(--surface-2); }
.search-result > span:first-child { width: 32px; height: 32px; display: grid; place-items: center; color: #191725; border-radius: 9px; background: var(--lime); font: 10px var(--mono); }
.search-result b { display: block; font-size: 13px; }
.search-result small { display: block; color: var(--muted); font-size: 10px; }
.search-result em { color: var(--muted); font: 9px var(--mono); font-style: normal; }
.search-empty { padding: 35px; text-align: center; color: var(--muted); }
.search-foot { display: flex; gap: 17px; padding: 10px 15px; border-top: 1px solid var(--line); color: var(--muted); font: 9px var(--mono); }
.search-foot span:last-child { margin-left: auto; }
.toast { position: fixed; z-index: 110; right: 25px; bottom: 25px; padding: 11px 15px; border-radius: 10px; background: var(--ink); color: #fff; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s; font-size: 12px; }
.toast.show { opacity: 1; transform: none; }

@media (max-width: 1040px) {
  .topbar { grid-template-columns: 210px 1fr auto; }
  .privacy-pill { display: none; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr .55fr; }
  .hero-card { width: 270px; }
  .converter > div { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .topbar { height: 68px; grid-template-columns: auto 1fr auto; padding: 0 16px; }
  .search-trigger { min-width: 0; justify-self: center; width: min(100%, 360px); }
  .menu-toggle { display: grid; }
  .shell { display: block; }
  .sidebar { position: fixed; z-index: 60; top: 68px; left: 0; bottom: 0; width: 270px; height: auto; transform: translateX(-102%); transition: transform .23s ease; box-shadow: 25px 0 60px rgba(0,0,0,.18); }
  .sidebar.open { transform: none; }
  .main { padding: 30px 22px 0; }
  .hero { min-height: auto; grid-template-columns: 1fr; padding: 35px 0 70px; }
  .hero-card { display: none; }
  .work-grid.split, .color-layout { grid-template-columns: 1fr; }
  .tool-head { min-height: 180px; }
  .converter { grid-template-columns: 1fr; }
  .swap-button { transform: rotate(90deg); justify-self: center; }
}

@media (max-width: 600px) {
  .brand small, .search-trigger span:not(.search-icon), .search-trigger kbd { display: none; }
  .search-trigger { width: 42px; padding: 0; justify-content: center; justify-self: end; }
  .topbar { grid-template-columns: 1fr auto auto; gap: 8px; }
  .main { padding: 18px 13px 0; }
  .hero { padding-top: 28px; }
  .hero h1 { font-size: 50px; }
  .hero-copy > p { font-size: 15px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 5px; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card.feature { grid-column: auto; }
  .tool-card { min-height: 255px; }
  .promise-strip { grid-template-columns: 1fr; }
  .promise-strip > div { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.15); }
  .tool-head { min-height: 165px; align-items: flex-start; flex-direction: column; justify-content: flex-end; }
  .star-tool { align-self: flex-start; }
  .panel { padding: 18px; }
  .inline-fields, .action-grid { grid-template-columns: 1fr 1fr; }
  .control-line { align-items: stretch; flex-direction: column; }
  .control-line label { min-width: 0; }
  .segmented { align-self: flex-start; }
  .result-list > div, .color-results > div { grid-template-columns: 72px 1fr auto; }
  .unit-tabs { overflow-x: auto; }
  .unit-tabs button { white-space: nowrap; }
  .converter > div { grid-template-columns: 1fr 110px; }
  .color-preview { min-height: 290px; }
  .color-preview strong { font-size: 90px; }
  .hash-output { grid-template-columns: 1fr auto; }
  .hash-output span { grid-column: 1/-1; }
  .base-panel { grid-template-columns: 1fr; }
  .base-results { grid-column: auto; grid-template-columns: 1fr; }
  .duration-display { grid-template-columns: repeat(2, 1fr); }
  .duration-display > div:nth-child(2) { border-right: 0; }
  .duration-display > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  footer { align-items: flex-start; flex-direction: column; gap: 10px; padding: 28px 0; }
  footer p { margin: 0; }
  .search-foot span:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
