:root {
  color-scheme: dark;
  font: 16px/1.55 "Segoe UI", Arial, sans-serif;
  color: #f7f1fa;
  background: #121019;
  --muted: #cdc0d4;
  --line: #49384f;
  --violet: #dcb1fc;
  --panel: #221c2c;
  --title-font: Georgia, serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
a { color: var(--violet); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid #dcacff; outline-offset: 3px; }
.skip { position: absolute; top: -6em; left: 1rem; z-index: 10; padding: .65rem 1rem; background: var(--panel); }
.skip:focus { top: .5rem; }
.wrap { width: min(1190px, calc(100% - 8vw)); margin-inline: auto; }

.home-header { background: #15111d; border-bottom: 1px solid var(--line); }
.header-inner, #main-menu { display: flex; align-items: center; gap: 32px; }
.header-inner { min-height: 66px; position: relative; }
.brand img { display: block; width: 158px; height: auto; }
#main-menu { flex: 1; }
#main-menu a { color: var(--muted); text-decoration: none; font-size: .94rem; }
#main-menu a:hover { text-decoration: underline; }
#main-menu [aria-current] { color: var(--violet); font-weight: 650; }
#main-menu .member-link { margin-left: auto; border: 1px solid #695775; padding: 6px 12px; border-radius: 6px; }
.menu-toggle { display: none; min-height: 44px; color: inherit; background: transparent; border: 0; padding: 0 .25rem; }

.guide-banner {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg,#1a0f2030,#170d20b0 38%,#160b1cac 60%,#1a0f2040),
              url("/site/assets/df-account-studio.webp") center 50% / cover;
}
.guide-intro { padding: 30px 0; text-align: center; }
h1, .guide-list-head h2, .guide-card h3, .guide-article h2, #filter-heading {
  font-family: var(--title-font); font-weight: 700; line-height: 1.12; letter-spacing: -.025em;
}
h1 { font-size: clamp(48px, 5vw, 76px); margin: 0; }
.guide-intro h1 { letter-spacing: -.055em; }
.guide-intro h1 span { color: #c490ed; }
#guide-search label { display: block; color: #e2d6e8; margin: 8px 0 14px; font-size: 1.04rem; }
.search-box {
  max-width: 620px;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: auto;
  padding-inline: 14px;
  background: #faf6fc;
  color: #352b3b;
  border-radius: 9px;
  box-shadow: 0 4px 19px #06020b50;
}
.search-box svg { width: 21px; flex: none; }
.search-box input { color-scheme: light; color: #201828; background: transparent; border: 0; width: 100%; min-width: 0; min-height: 48px; }
.search-box input::placeholder { color: #62586a; }
.search-box:focus-within { outline: 3px solid #bb86e5; }
.search-box input:focus-visible { outline: none; }
.guide-examples { display: flex; justify-content: center; flex-wrap: wrap; align-items: center; gap: 4px 13px; margin-top: 8px; font-size: .87rem; color: var(--muted); }
.guide-examples button, .plain { color: var(--violet); background: none; border: 0; padding: 4px 0; min-height: 38px; text-decoration: underline; text-underline-offset: .2em; }

.guide-catalogue { padding: 34px 0 44px; }
.guide-list-head, .guide-list-actions, .guide-browse-controls, .filter-fields {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
}
.guide-list-head { justify-content: space-between; margin-bottom: 13px; }
.guide-list-head h2 { margin: 0; font-size: 1.95rem; }
.guide-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.guide-card {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 21px; border: 1px solid var(--line); border-radius: 10px;
  background: linear-gradient(145deg,#261f2f,#1c1824);
  color: inherit; text-decoration: none;
}
a.guide-card:hover { border-color: #ae7ac9; }
.guide-topic { color: var(--violet); font-size: .86rem; font-weight: 650; margin: 0; }
.guide-card h3 { font-size: clamp(1.42rem, 2vw, 1.7rem); margin: 7px 0 6px; }
.guide-summary { color: var(--muted); margin: 0 0 14px; font-size: .97rem; }
.guide-card > span { color: var(--violet); font-size: .87rem; margin-top: auto; padding-top: 10px; }
.guide-topics { display: flex; flex-wrap: wrap; gap: 7px; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 16px; }
.guide-topics button, #open-guide-filters { color: #eee5f3; background: var(--panel); border: 1px solid #6c5678; border-radius: 7px; min-height: 42px; padding: 6px 12px; }
.guide-topics button { border-radius: 22px; }
.guide-topics button[aria-pressed="true"] { background: #3a244c; border-color: #aa76d3; }
.guide-browse-controls label, .filter-fields label { color: var(--muted); font-size: .9rem; }
select { min-height: 42px; padding: 5px 8px; background: var(--panel); color: #fff; border: 1px solid #806890; border-radius: 7px; max-width: 100%; }
.filter-fields { align-items: end; padding: 14px; margin-bottom: 15px; border: 1px solid var(--line); border-radius: 8px; background: #1c1724; }
.filter-fields label { display: grid; gap: 5px; }
.guide-empty { padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.guide-empty h3, .sheet-head h2 { margin: 0; }
.guide-empty p { color: var(--muted); margin: 5px 0; }
.guide-button {
  display: flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 7px 16px;
  color: #fff; background: linear-gradient(160deg,#974ee8,#732bca);
  border: 1px solid #a665f2; border-radius: 7px;
  font-weight: 650; text-align: center; text-decoration: none;
}
#more-guides { margin: 16px auto 0; }
#guide-sheet { padding: 22px; border: 1px solid #80698f; border-radius: 15px; background: #241c2e; color: #faf4ff; width: min(420px,95vw); }
#guide-sheet::backdrop { background: #09060cb5; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head button { color: inherit; background: transparent; border: none; min-width: 44px; min-height: 44px; font-size: 1.5rem; }
#guide-sheet .filter-fields { display: grid; padding: 0; border: 0; background: transparent; }
#guide-sheet .guide-button { width: 100%; }

.guide-article { max-width: 1040px; padding: 30px 0 38px; }
.article-heading { max-width: 850px; padding-bottom: 24px; }
.article-heading .guide-topic { margin: 22px 0 6px; }
.article-heading h1 { font-size: clamp(2.3rem, 5vw, 3.9rem); }
.lead { max-width: 65ch; color: var(--muted); font-size: 1.15rem; margin: 12px 0; }
.byline { font-size: .9rem; color: var(--muted); margin: 0; }
.article-layout { display: grid; grid-template-columns: minmax(0, 68ch) minmax(190px, 1fr); grid-template-rows: min-content 1fr; gap: 1rem clamp(1.5rem, 4vw, 3rem); align-items: start; }
.article-layout article { grid-area: 1 / 1 / span 2; font-size: 1.06rem; line-height: 1.68; min-width: 0; }
.article-layout aside { grid-area: 1 / 2; }
.article-layout p { margin: 0 0 1.05em; }
.article-layout h2 { font-size: 1.72rem; margin: 1.25em 0 .45em; }
.article-layout h3 { font-size: 1.23rem; margin: 1.25em 0 .45em; }
.article-layout h2, .article-layout h3 { scroll-margin-top: 16px; }
.article-layout ul, .article-layout ol, .related ul { padding-inline-start: 1.3rem; }
.article-layout li, .related li { margin-bottom: .45rem; }
.article-layout details, .next-step { padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.article-layout summary { cursor: pointer; font-weight: 650; }
.next-step { grid-area: 2 / 2; }
.next-step h2 { font-size: 1.25rem; margin: 0 0 .7rem; }
.related { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 12px; }
.guide-footer { padding-block: 20px 30px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-size: .86rem; }
.guide-footer a { color: var(--muted); }

@media (max-width: 900px) {
  .header-inner, #main-menu { gap: 16px; }
  .guide-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
  .article-layout aside, .article-layout article, .next-step { grid-area: auto; }
}
@media (max-width: 650px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { min-height: 58px; justify-content: space-between; flex-wrap: wrap; padding-block: 5px; }
  .brand img { width: 125px; }
  #main-menu { flex-basis: 100%; flex-wrap: wrap; padding: 6px 0; }
  .enhanced-nav .menu-toggle { display: block; }
  .enhanced-nav #main-menu { display: none; }
  .enhanced-nav #main-menu[data-open="true"] {
    position: absolute; display: grid; gap: 4px; inset: 100% 0 auto auto; z-index: 4;
    padding: .65rem; border: 1px solid var(--line); border-radius: 8px; background: #241a30;
  }
  #main-menu a, #main-menu .member-link { padding: .5rem .7rem; margin: 0; border: 0; }
  .guide-banner { background-image: linear-gradient(90deg,#180f1ecd,#180f1e9c),url("/site/assets/df-account-studio.webp"); }
  .guide-intro { padding: 20px 0 15px; }
  .guide-intro h1 { font-size: clamp(2.35rem, 12vw, 2.9rem); }
  .guide-catalogue { padding-top: 34px; }
  .guide-list-head h2 { font-size: 1.55rem; }
  .guide-grid { grid-template-columns: minmax(0,1fr); }
  .guide-card { padding: 16px; }
  .guide-card h3 { font-size: 1.53rem; }
  #guide-filters { display: none; }
  #guide-sheet { position: fixed; inset: auto 0 0; max-width: none; width: 100%; max-height: 95dvh; margin: 0; border-radius: 16px 16px 0 0; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}
@media print {
  :root { background: white; color: black; }
  .home-header, .skip, .guide-footer, .article-layout aside, .next-step, .related { display: none; }
  .article-layout { display: block; }
  .lead, .byline, .guide-topic { color: #333; }
  .article-layout h2, .article-layout h3 { break-after: avoid; }
}


