/* Techsania — the full settings page (fx.js) and the choices it makes. */

/* ---- The page ---- */
body.st-open { overflow: hidden; }
.st { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); animation: st-in .28s cubic-bezier(.2,.9,.3,1); }
.st[hidden] { display: none; }
@keyframes st-in { from { opacity: 0; transform: translateY(14px); } }
.st-head { display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: var(--paper); border-bottom: 1px solid var(--line); }
.st-head h2 { font-size: 22px; margin-inline-end: auto; }
.st-search { max-width: 280px; min-height: 40px; padding: 8px 14px; font-size: 15px; }
.st-back { display: none; border: 0; background: transparent; color: var(--ink); font-size: 24px; padding: 4px 8px; cursor: pointer; border-radius: 8px; }
.st-body { flex: 1; display: grid; grid-template-columns: 230px 1fr; min-height: 0; }
.st-nav { padding: 16px 10px; border-inline-end: 1px solid var(--line); overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.st-nav button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; text-align: start; cursor: pointer; transition: background-color .15s, color .15s; }
.st-nav button:hover { background: var(--sand); }
.st-nav button[aria-current="true"] { background: var(--brand); color: #fff; }
.st-ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.st-main { overflow: auto; padding: 8px 28px 80px; scroll-padding-top: 12px; }
.st-sec { max-width: 760px; margin: 18px auto 0; }
.st-sec h3 { display: flex; align-items: center; gap: 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 8px 4px; }
.st-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 18px; box-shadow: var(--shadow); }
.st-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.st-row:first-child, .st-profile + .st-row { border-top: 0; }
.st-row[hidden] { display: none; }
.st-col { flex-direction: column; align-items: stretch; }
.st-t { font-weight: 650; font-size: 15px; }
.st-d { color: var(--muted); font-size: 13.5px; margin-top: 2px; line-height: 1.45; }
.st-c { flex: none; display: flex; align-items: center; gap: 8px; }
.st-c .fx-seg { min-width: 240px; }
.st-swatches { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); margin-top: 6px; }
.st-tog { padding: 0; }
.st-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.st-badge { display: inline-block; padding: 4px 10px; border-radius: 99px; background: var(--sand); color: var(--muted); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.st-profile { display: flex; align-items: center; gap: 14px; padding: 16px 0 12px; }
.st-avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; font-size: 19px; flex: none; }
.st-logo { border-radius: 12px; }
.st-name { font-weight: 700; font-size: 18px; }
.st-sample { font-family: var(--serif); font-size: 15px; color: var(--ink); }
.st-range { display: flex; align-items: center; gap: 10px; }
.st-range input { width: 160px; accent-color: var(--brand); }
.st-times { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.st-times .input { width: 120px; min-height: 40px; padding: 6px 10px; }
.st-select { min-height: 40px; padding: 6px 10px; width: auto; }
.st-keys kbd { display: inline-block; min-width: 26px; padding: 3px 7px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--bg); font: 600 13px var(--font); text-align: center; }
.st-none { text-align: center; color: var(--muted); margin-top: 40px; }
.st-saved { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); opacity: 0; background: var(--fx-deep, var(--navy-deep)); color: #fff; padding: 9px 16px; border-radius: 99px; font-weight: 600; font-size: 14px; pointer-events: none; transition: opacity .2s, transform .25s cubic-bezier(.2,1.3,.4,1); }
.st-saved.on { opacity: 1; transform: translate(-50%, 0); }

/* Phones: menu becomes a strip of chips under the header */
@media (max-width: 720px) {
  .st-head { flex-wrap: wrap; padding: 10px 14px; }
  .st-head .fx-x { display: none; }
  .st-back { display: block; }
  .st-search { order: 3; max-width: none; flex-basis: 100%; }
  .st-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .st-nav { flex-direction: row; overflow-x: auto; padding: 8px 12px; border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .st-nav button { width: auto; flex: none; padding: 8px 12px; white-space: nowrap; }
  .st-main { padding: 4px 14px 80px; }
  .st-row { flex-wrap: wrap; }
  .st-col { flex-wrap: nowrap; }
  .st-swatches { grid-template-columns: repeat(4, 1fr); align-content: start; }
  .st-c { flex: 1 1 100%; }
  .st-c .fx-seg { min-width: 0; flex: 1; }
  .st-txt + .st-c:has(.st-tog), .st-txt + .st-c:has(.st-badge) { flex: none; }
}

/* ---- What the choices do ---- */
:root[data-heading="modern"] h1, :root[data-heading="modern"] h2, :root[data-heading="modern"] .brand, :root[data-heading="modern"] .nav-brand { font-family: var(--font); font-weight: 750; letter-spacing: -0.025em; }
:root[data-heading="modern"] .brand span, :root[data-heading="modern"] .nav-brand span { font-style: normal; }

:root[data-corners="sharp"] { --radius: 4px; --radius-sm: 3px; }
:root[data-corners="extra"] { --radius: 22px; --radius-sm: 14px; }

:root[data-density="compact"] .card { padding: 13px 15px; }
:root[data-density="compact"] .card + .card { margin-top: 9px; }
:root[data-density="compact"] .btn { min-height: 40px; padding-top: 8px; padding-bottom: 8px; }
:root[data-density="compact"] .arrival { padding: 11px 14px; }
:root[data-density="spacious"] .card { padding: 28px; }
:root[data-density="spacious"] .card + .card { margin-top: 20px; }
:root[data-density="spacious"] .arrival { padding: 22px; }

:root[data-glow="off"] body { background-image: none !important; }

html[data-contrast="on"][data-theme="light"][data-palette] { --ink: #0E1411; --navy-deep: #0E1411; --muted: #3E433F; --line: #8E968F; --line-tint: #8E968F; }
html[data-contrast="on"][data-theme="dark"][data-palette] { --ink: #FFFFFF; --navy-deep: #FFFFFF; --muted: #D6DBD3; --line: #7C857E; --line-tint: #7C857E; }

:root[data-underline="on"] a:not(.btn):not(.brand):not(.nav-brand) { text-decoration: underline !important; text-underline-offset: 3px; }

:root[data-targets="on"] .btn, :root[data-targets="on"] .input, :root[data-targets="on"] select, :root[data-targets="on"] .chip { min-height: 54px; }
:root[data-targets="on"] .chip { padding: 12px 18px; }
:root[data-targets="on"] .btn-sm { min-height: 48px; padding: 10px 18px; }

:root[data-readable="on"] body { letter-spacing: .03em; word-spacing: .12em; line-height: 1.75; }

:root[data-focus="on"] :focus-visible { outline: 3px solid var(--accent) !important; outline-offset: 3px !important; }

:root[data-noblur="on"] * { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
:root[data-noblur="on"] .site-nav { background: var(--bg) !important; }

/* Right-to-left pages (Hebrew, Arabic): the back arrow points the reading way. */
[dir="rtl"] .st-back { transform: scaleX(-1); }
