:root {
  --cream: #f6f2eb;
  --paper: #ffffff;
  --teal: #16878a;
  --teal-deep: #096d70;
  --teal-dark: #064f52;
  --teal-pale: #e5f2f1;
  --coral: #c53e3e;
  --ink: #193f40;
  --body-ink: #4e5f60;
  --muted: #708082;
  --line: #ddd8cf;
  --shadow: 0 18px 42px rgba(27, 62, 62, .11);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 10% 0%, rgba(22,135,138,.06), transparent 30rem), var(--cream); color: var(--body-ink); font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 1.5; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 3px solid #f4c25d; outline-offset: 3px; }
.skip-link { position: fixed; z-index: 20; top: -4rem; left: 1rem; padding: .7rem 1rem; border-radius: .5rem; background: #fff; color: var(--teal-dark); font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 1rem; }

.site-shell { width: min(100%, 1480px); margin: 0 auto; padding: 22px 22px 90px; }
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .82fr); gap: clamp(28px, 4vw, 64px); overflow: hidden; padding: clamp(32px, 5vw, 68px); border-radius: 40px; background: linear-gradient(124deg, var(--teal-deep), #249497); box-shadow: var(--shadow); color: #fff; }
.hero::after { position: absolute; right: 36%; bottom: -175px; width: 255px; height: 255px; border: 1px solid rgba(255,255,255,.18); border-radius: 44px; content: ""; transform: rotate(31deg); }
.hero-copy, .contact-card { position: relative; z-index: 1; }
.eyebrow, .section-kicker, .topic-label { margin: 0 0 12px; font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow { color: rgba(255,255,255,.76); }
.eyebrow.dark { color: var(--teal-deep); }
.hero h1 { max-width: 780px; margin: 0; font-size: clamp(2.85rem, 6vw, 5.7rem); line-height: .98; letter-spacing: -.055em; }
.hero-intro { max-width: 760px; margin: 24px 0 0; color: rgba(255,255,255,.9); font-size: clamp(1rem, 1.4vw, 1.26rem); line-height: 1.65; }
.faq-search { width: min(100%, 760px); margin-top: 28px; }
.faq-search > label { display: block; margin-bottom: 9px; font-size: .92rem; font-weight: 800; }
.search-input-wrap { position: relative; display: flex; align-items: center; }
.search-input-wrap > span { position: absolute; left: 19px; z-index: 1; color: var(--teal-deep); font-size: 2rem; line-height: 1; pointer-events: none; transform: rotate(-20deg); }
.search-input-wrap input { width: 100%; height: 62px; padding: 0 55px 0 54px; border: 2px solid transparent; border-radius: 18px; background: #fff; color: var(--ink); box-shadow: 0 14px 32px rgba(2,49,51,.18); }
.search-input-wrap input:focus { border-color: #8bcac9; outline: 0; }
.search-clear { position: absolute; right: 10px; display: grid; width: 38px; height: 38px; place-items: center; border: 0; border-radius: 50%; background: var(--cream); color: var(--teal-deep); font-size: 1.55rem; cursor: pointer; }
.search-clear:hover { background: #e1efed; }
.search-hint { margin: 10px 0 0; color: rgba(255,255,255,.75); font-size: .84rem; }
.topic-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.topic-pills a { padding: 9px 17px; border: 1px solid rgba(255,255,255,.31); border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; font-size: .93rem; font-weight: 700; text-decoration: none; transition: background .16s ease, transform .16s ease; }
.topic-pills a:hover { background: rgba(255,255,255,.24); transform: translateY(-1px); }
.contact-card { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; min-height: 270px; padding: 29px; border: 1px solid rgba(255,255,255,.3); border-radius: 30px; background: rgba(255,255,255,.16); box-shadow: inset 0 1px rgba(255,255,255,.12); }
.contact-icon { display: grid; width: 50px; height: 50px; place-items: center; border-radius: 17px; background: #fff; color: var(--teal-deep); font-size: 2rem; font-weight: 800; }
.contact-kicker { margin: 0 0 5px; color: rgba(255,255,255,.7); font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.contact-card h2 { margin: 0; font-size: 1.55rem; line-height: 1.13; }
.contact-card p:not(.contact-kicker) { margin: 10px 0 0; color: rgba(255,255,255,.86); }
.contact-link { display: inline-flex; justify-content: space-between; align-items: center; width: 100%; padding: 13px 15px; border-radius: 13px; background: #fff; color: var(--teal-deep); font-weight: 800; text-decoration: none; }
.contact-link span { font-size: 1.3rem; }

.results-panel, .faq-area { width: min(100%, 1120px); margin: 62px auto 0; }
.results-panel { padding: clamp(22px, 4vw, 40px); border: 1px solid #cee4e1; border-radius: 25px; background: #f7fbfa; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.section-heading h2 { margin: 0; color: var(--ink); font-size: clamp(1.7rem, 3vw, 2.55rem); line-height: 1.1; letter-spacing: -.035em; }
.section-kicker, .topic-label { color: var(--teal-deep); }
.section-heading > p { margin: 0; color: var(--muted); font-weight: 700; white-space: nowrap; }
.results-list { display: grid; gap: 12px; }
.result-link { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 18px 20px; border: 1px solid #d2e4e1; border-radius: 15px; background: #fff; color: var(--ink); text-decoration: none; }
.result-link:hover { border-color: var(--teal); box-shadow: 0 7px 20px rgba(22,135,138,.1); }
.result-link strong, .result-link small { display: block; }
.result-link small { margin-top: 3px; color: var(--muted); }
.result-link span:last-child { color: var(--teal-deep); font-size: 1.4rem; font-weight: 700; }
.no-results { margin: 0; padding: 18px; border-radius: 13px; background: #fff; color: var(--body-ink); }
.overview-heading { margin-bottom: 28px; }
.topic { margin-top: 26px; overflow: hidden; border: 1px solid var(--line); border-radius: 23px; background: var(--paper); box-shadow: 0 8px 24px rgba(40,65,64,.035); scroll-margin-top: 22px; }
.topic-header { display: flex; align-items: start; justify-content: space-between; gap: 22px; padding: 28px 30px 23px; border-bottom: 1px solid var(--line); }
.topic-header h3 { margin: 0; color: var(--ink); font-size: 1.55rem; line-height: 1.15; }
.topic-header p:not(.topic-label) { margin: 8px 0 0; }
.topic-count { padding: 7px 10px; border-radius: 999px; background: var(--teal-pale); color: var(--teal-dark); font-size: .82rem; font-weight: 800; white-space: nowrap; }
.question-list { padding: 5px 30px 18px; }
.faq-item { border-bottom: 1px solid var(--line); scroll-margin-top: 18px; }
.faq-item:last-child { border-bottom: 0; }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 19px 0; color: var(--ink); font-weight: 800; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.chevron { display: grid; width: 29px; height: 29px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--teal-pale); color: var(--teal-deep); font-size: 1.35rem; transition: transform .18s ease; }
.faq-item[open] .chevron { transform: rotate(180deg); }
.answer { max-width: 850px; padding: 0 42px 21px 0; color: var(--body-ink); line-height: 1.7; }
.answer p { margin: 0; }
.site-footer { display: flex; justify-content: space-between; width: min(100%, 1120px); margin: 0 auto; padding: 0 22px 35px; color: var(--muted); font-size: .9rem; }
.site-footer a { color: var(--teal-deep); text-decoration: none; }

.admin-page, .admin-login-page { min-height: 100vh; background: #edf4f3; color: var(--ink); }
.admin-topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; padding: 27px max(24px, calc((100% - 1180px) / 2)); background: var(--teal-deep); color: #fff; }
.admin-topbar h1 { margin: 10px 0 4px; font-size: clamp(1.8rem, 4vw, 2.7rem); letter-spacing: -.04em; }
.admin-topbar p { margin: 0; color: rgba(255,255,255,.8); }
.admin-topbar nav { display: flex; flex-wrap: wrap; justify-content: end; gap: 10px; }
.back-link { display: inline-block; color: inherit; font-weight: 700; text-decoration: none; }
.admin-topbar .back-link { color: rgba(255,255,255,.86); }
.admin-shell { width: min(100% - 44px, 1120px); margin: 34px auto 80px; }
.editor-intro { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 20px; }
.editor-intro h2 { margin: 0; font-size: 1.7rem; }
.editor-topics { display: grid; gap: 24px; }
.topic-editor { padding: clamp(20px, 3vw, 32px); border: 1px solid #cbdedb; border-radius: 22px; background: #fff; box-shadow: 0 10px 24px rgba(28,71,70,.055); }
.topic-editor-header, .question-editor-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topic-editor > label, .question-editor > label, .login-form > label { display: grid; gap: 7px; margin-top: 19px; color: var(--ink); font-size: .92rem; font-weight: 800; }
.topic-editor input, .topic-editor textarea, .question-editor input, .question-editor textarea, .login-form input { width: 100%; border: 1px solid #b8cbc8; border-radius: 10px; background: #fff; color: #173f40; font-weight: 400; }
.topic-editor input, .question-editor input, .login-form input { min-height: 45px; padding: 9px 12px; }
.topic-editor textarea, .question-editor textarea { padding: 10px 12px; resize: vertical; }
.topic-editor input:focus, .topic-editor textarea:focus, .question-editor input:focus, .question-editor textarea:focus, .login-form input:focus { border-color: var(--teal); outline: 3px solid rgba(22,135,138,.17); }
.drag-label { color: var(--teal-deep); font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.question-editor-list { display: grid; gap: 14px; margin: 23px 0 16px; }
.question-editor { padding: 20px; border: 1px solid #d7e4e1; border-radius: 15px; background: #f8fbfa; }
.question-editor > label { margin-top: 14px; }
.text-button { padding: 3px; border: 0; background: transparent; color: var(--teal-deep); font-size: .88rem; font-weight: 800; cursor: pointer; text-decoration: underline; }
.text-button.danger { color: var(--coral); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 43px; padding: 10px 16px; border: 1px solid transparent; border-radius: 10px; font-weight: 800; text-align: center; text-decoration: none; cursor: pointer; }
.button-primary { background: var(--teal-deep); color: #fff; }
.button-primary:hover { background: var(--teal-dark); }
.button-secondary { background: var(--teal-pale); color: var(--teal-dark); }
.button-outline { border-color: #9cc5c1; background: #fff; color: var(--teal-deep); }
.button-light { background: #fff; color: var(--teal-deep); }
.button-dark { border-color: rgba(255,255,255,.4); background: transparent; color: #fff; }
.editor-save-bar { position: sticky; bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 28px; padding: 17px 19px; border: 1px solid #bcd6d2; border-radius: 15px; background: rgba(255,255,255,.96); box-shadow: 0 12px 28px rgba(22,61,60,.15); }
.editor-save-bar p { margin: 0; color: var(--body-ink); }
.message { margin-bottom: 22px; padding: 14px 16px; border-radius: 12px; font-weight: 700; }
.message-error { border: 1px solid #efbaba; background: #fff2f2; color: #8c2424; }
.message-success { border: 1px solid #afd6c0; background: #effaf3; color: #1c6e42; }

.admin-login-page { display: grid; place-items: center; padding: 25px; }
.login-card { width: min(100%, 540px); padding: clamp(26px, 5vw, 47px); border: 1px solid #d1dfdd; border-radius: 25px; background: #fff; box-shadow: var(--shadow); }
.login-card h1 { margin: 8px 0; font-size: 2.45rem; letter-spacing: -.04em; }
.login-card > p:not(.eyebrow) { margin: 0; color: var(--body-ink); }
.login-card .message { margin-top: 21px; margin-bottom: 0; }
.login-form { display: grid; gap: 18px; margin-top: 27px; }
.login-form > label { margin-top: 0; }
.login-form label small { color: var(--muted); font-weight: 400; }
.login-form .button { width: 100%; margin-top: 4px; }
.account-card { width: min(100%, 620px); }
code { padding: 2px 5px; border-radius: 4px; background: #e8f1ef; color: var(--teal-dark); }

@media (max-width: 780px) {
  .site-shell { padding: 12px 12px 60px; }
  .hero { grid-template-columns: 1fr; padding: 32px 23px; border-radius: 25px; }
  .contact-card { min-height: auto; }
  .results-panel, .faq-area { margin-top: 42px; }
  .section-heading, .topic-header, .editor-intro, .editor-save-bar, .admin-topbar { align-items: stretch; flex-direction: column; }
  .section-heading > p { white-space: normal; }
  .topic-header { padding: 23px; }
  .question-list { padding: 4px 23px 15px; }
  .answer { padding-right: 0; }
  .site-footer { padding: 0 19px 28px; }
  .admin-topbar { padding: 24px; }
  .admin-topbar nav { justify-content: flex-start; }
  .editor-save-bar { bottom: 7px; }
}

@media (max-width: 440px) {
  .hero h1 { font-size: 2.7rem; }
  .topic-pills { gap: 7px; }
  .topic-pills a { padding: 8px 12px; font-size: .85rem; }
  .topic-editor, .question-editor { padding: 17px; }
  .button { width: 100%; }
  .admin-topbar nav { width: 100%; }
}
