/* =====================================================================
   MOKA · owner portal
   Same brand as the guest site and the agent portal.
   ===================================================================== */

@font-face { font-family: "FrauncesCrisp"; src: url("../fonts/Fraunces-display.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("../fonts/Satoshi-Variable.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
  --canvas: #fff6f4;
  --canvas-2: #f9eeea;
  --white: #fffdfb;
  --creme: #ebddcf;
  --sand: #cfbca7;
  --dune: #9d8262;
  --terracotta: #b3624f;
  --terracotta-deep: #9e5340;
  --ink: #3e311e;
  --ink-2: #6b5a45;
  --label: #856848;
  --line: rgba(157, 130, 98, .28);
  --mark: rgba(179, 98, 79, .2);
  --font-display: "FrauncesCrisp", Georgia, "Times New Roman", serif;
  --font-body: "Satoshi", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
  --nav-h: 62px;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 18px); }
body { background: var(--canvas); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
body.locked { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
[hidden] { display: none !important; }

.wrap { width: min(var(--wrap), 100%); margin-inline: auto; padding-inline: var(--gutter); }
.kicker { font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--label); }
.h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.2rem, 5.4vw, 3.8rem); line-height: 1.03; letter-spacing: -.01em; }
.h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.1; }
.h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; line-height: 1.2; }
.lead { color: var(--ink-2); font-size: clamp(1rem, 1.5vw, 1.12rem); max-width: 62ch; }
.fineprint { color: var(--label); font-size: .88rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px; border-radius: var(--radius-sm); font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; white-space: nowrap; transition: background .2s, color .2s, border-color .2s; }
.btn-sm { padding: 10px 16px; font-size: .7rem; }
.btn-primary { background: var(--ink); color: var(--canvas); }
.btn-primary:hover { background: #4d3d26; }
.btn-ghost { border: 1.5px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }

/* ---------- Light lock ---------- */
.gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: var(--gutter); background: var(--canvas); }
.gate-card { width: min(380px, 100%); display: grid; gap: 12px; justify-items: center; text-align: center; }
.gate-logo { width: 110px; height: 55px; color: var(--ink); margin-bottom: 6px; }
.gate-title { font-family: var(--font-display); font-weight: 400; font-size: 2rem; line-height: 1.1; margin-bottom: 8px; }
.gate-label { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); justify-self: start; }
.gate-input { width: 100%; padding: 14px 16px; border-radius: var(--radius-sm); border: 1.5px solid var(--sand); background: var(--white); font: inherit; color: var(--ink); }
.gate-input:focus { outline: none; border-color: var(--dune); box-shadow: 0 0 0 4px rgba(179, 98, 79, .18); }
.gate-err { color: var(--terracotta-deep); font-size: .88rem; min-height: 1.3em; }
.gate-card .btn { width: 100%; }
.shake { animation: shake .35s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- Header ---------- */
.nav { position: sticky; top: 0; z-index: 40; background: rgba(255, 246, 244, .94); backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--line); }
.nav-in { width: min(var(--wrap), 100%); margin-inline: auto; padding: 0 var(--gutter); height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark { width: 84px; height: 42px; color: var(--ink); }
.logo-tag { font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--label); border-left: 1px solid var(--line); padding-left: 10px; }

/* ---------- Hero with search ---------- */
.hero { padding: clamp(40px, 7vw, 84px) 0 clamp(26px, 4vw, 40px); background: linear-gradient(180deg, var(--canvas-2), var(--canvas)); border-bottom: 1px solid var(--line); }
.hero-in { display: grid; gap: 14px; }
.search { position: relative; margin-top: 12px; max-width: 720px; }
.search input { width: 100%; padding: 18px 52px 18px 54px; border-radius: 999px; border: 1.5px solid var(--sand); background: var(--white); font: inherit; font-size: 1.05rem; color: var(--ink); box-shadow: 0 14px 34px -26px rgba(62, 49, 30, .4); -webkit-appearance: none; appearance: none; }
.search input::-webkit-search-cancel-button { display: none; }
.search input:focus { outline: none; border-color: var(--dune); box-shadow: 0 0 0 4px rgba(179, 98, 79, .16), 0 14px 34px -26px rgba(62, 49, 30, .4); }
.search-ic { position: absolute; left: 20px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); fill: none; stroke: var(--dune); stroke-width: 2; stroke-linecap: round; }
.search-clear { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; font-size: 1.3rem; line-height: 1; color: var(--ink-2); background: var(--canvas-2); }
.search-clear:hover { background: var(--creme); }
.search-meta { color: var(--label); font-size: .9rem; min-height: 1.4em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip { padding: 7px 13px; border-radius: 999px; background: var(--white); box-shadow: 0 0 0 1px var(--line); font-size: .85rem; font-weight: 600; text-decoration: none; transition: box-shadow .2s, color .2s; }
.chip:hover { box-shadow: 0 0 0 1.5px var(--terracotta); color: var(--terracotta-deep); }
.is-searching .chips { display: none; }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(28px, 4vw, 60px); padding-top: clamp(28px, 4vw, 48px); padding-bottom: clamp(56px, 8vw, 100px); align-items: start; }
.side { position: sticky; top: calc(var(--nav-h) + 24px); }
.side-title { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--label); margin-bottom: 10px; }
.side-link { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; margin-left: -10px; border-radius: var(--radius-sm); text-decoration: none; font-size: .93rem; font-weight: 600; color: var(--ink-2); transition: background .2s, color .2s; }
.side-link:hover { background: var(--canvas-2); color: var(--ink); }
.side-link.is-on { background: var(--canvas-2); color: var(--ink); }
.side-n { font-size: .78rem; font-weight: 700; color: var(--label); }
.side-link.is-empty { opacity: .4; }

.topic { padding: clamp(30px, 4vw, 46px) 0; border-bottom: 1px solid var(--line); }
.topic:first-child { padding-top: 0; }
.topic-head { display: grid; gap: 6px; margin-bottom: 14px; }
.num { font-family: var(--font-display); font-size: .95rem; color: var(--terracotta); }
.topic-intro { color: var(--ink-2); }

.qa { border-bottom: 1px solid var(--line); }
.qa:first-child { border-top: 1px solid var(--line); }
.qa summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 16px 36px 16px 0; position: relative; font-weight: 600; font-size: 1.02rem; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--dune); border-bottom: 2px solid var(--dune); transform: translateY(-70%) rotate(45deg); transition: transform .25s var(--ease); }
.qa[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.qa summary:hover .qa-q { color: var(--terracotta-deep); }
.badge { flex: 0 0 auto; padding: 3px 9px; border-radius: 999px; background: var(--creme); color: var(--ink-2); font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.qa-body { padding: 0 0 20px; }
.answer { display: grid; gap: 10px; color: var(--ink-2); max-width: 74ch; }
.answer strong { color: var(--ink); font-weight: 700; }
.answer ul { display: grid; gap: 6px; }
.answer li { position: relative; padding-left: 20px; }
.answer li::before { content: ""; position: absolute; left: 4px; top: .65em; width: 6px; height: 6px; border-radius: 50%; background: var(--terracotta); }
.qa-foot { margin-top: 14px; }
.copy { font-size: .8rem; font-weight: 600; color: var(--label); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--sand); }
.copy:hover { color: var(--terracotta-deep); }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; }
.qa.is-target { animation: flash 2.4s var(--ease); }
@keyframes flash { 0%, 40% { background: var(--canvas-2); } 100% { background: transparent; } }

.empty { padding: 36px 0; display: grid; gap: 10px; justify-items: start; }
.empty p { color: var(--ink-2); }
.ask { margin-top: clamp(20px, 3vw, 34px); padding: clamp(20px, 3vw, 30px); border-radius: var(--radius); background: var(--white); box-shadow: 0 0 0 1px var(--line); display: grid; gap: 10px; justify-items: start; }
.ask p { color: var(--ink-2); }

.foot { background: var(--ink); color: var(--canvas); padding: clamp(40px, 6vw, 64px) 0; }
.foot .wrap { display: grid; justify-items: center; gap: 12px; text-align: center; }
.foot-logo { width: 100px; height: 50px; color: var(--canvas); }
.foot-note { max-width: 70ch; color: rgba(255, 246, 244, .85); font-size: .92rem; }
.foot .fineprint { color: rgba(255, 246, 244, .6); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; padding: 12px 18px; border-radius: 999px; background: var(--ink); color: var(--canvas); font-size: .88rem; font-weight: 600; box-shadow: 0 16px 40px -18px rgba(62, 49, 30, .6); }

/* ---------- Narrow ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .side { display: none; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .logo-tag { display: none; }
  .search input { padding: 15px 46px 15px 46px; font-size: 1rem; }
  .search-ic { left: 16px; }
  .qa summary { font-size: .98rem; flex-wrap: wrap; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shake, .qa.is-target { animation: none; }
}
@media print {
  .nav, .search, .chips, .side, .copy, .ask, .gate { display: none !important; }
  .qa .qa-body { display: block; }
}
