/* AWARD 0.8.3: legible card surfaces and stable page framing. */
html[data-theme] {
  --card-panel: #fffcf5;
  --card-title: #173c2d;
  --card-copy: #395548;
  --card-meta: #486354;
  --card-border: #c7d2c0;
  --card-line: #dce3d5;
  --card-accent: #856022;
  --card-badge: #fffdf5;
  --card-badge-text: #2c523e;
  --card-badge-border: #b8c7ad;
  --card-monogram: #e5edde;
  --card-monogram-text: #244a35;
}
html[data-theme=dark] {
  --card-panel: #1c3f33;
  --card-title: #fff9e9;
  --card-copy: #e1eadf;
  --card-meta: #c2d4c4;
  --card-border: #536f57;
  --card-line: #486853;
  --card-accent: #eed29b;
  --card-badge: #193c2f;
  --card-badge-text: #e3eedc;
  --card-badge-border: #637e58;
  --card-monogram: #294f3d;
  --card-monogram-text: #edd9ae;
}
html[data-theme] .home-entry {
  background: var(--card-panel);
  color: var(--card-title);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  box-shadow: 0 8px 20px -16px #081f2580;
  transition: border-color .15s ease;
}
html[data-theme] .home-entry:hover {
  border-color: var(--card-accent);
  transform: none;
  box-shadow: 0 8px 20px -16px #081f2580;
}
html[data-theme] .home-entry:focus-visible {
  outline: 3px solid var(--card-accent);
  outline-offset: 4px;
}
html[data-theme] .home-entry-cover.has-feature {
  height: 156px;
  min-height: 0;
  padding: 42px 20px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
html[data-theme] .home-entry-cover.has-feature::after { display: none; }
html[data-theme] .home-entry-cover.has-feature::before { opacity: .25; }
html[data-theme] .home-entry-feature {
  width: min(100%, 220px);
  height: 98px;
  max-height: 98px;
  object-fit: contain;
  background: #fff;
  padding: 10px;
  border: 1px solid #e4dbc7;
  border-radius: 12px;
  box-shadow: none;
}
html[data-theme=dark] .home-entry-cover.home-entry-theme-sage {
  background: #354f3e;
  color: #c9dfc4;
}
html[data-theme=dark] .home-entry-cover.home-entry-theme-linen {
  background: #504637;
  color: #e7d4ad;
}
html[data-theme=dark] .home-entry-cover.home-entry-theme-forest {
  background: #285342;
  color: #d9e3c4;
}
html[data-theme=dark] .home-entry-cover.home-entry-theme-navy {
  background: #2c4051;
  color: #d4e1e5;
}
html[data-theme=dark] .home-entry-cover.home-entry-theme-graphite {
  background: #3c3d43;
  color: #e7dfcd;
}
html[data-theme] .home-entry-cover .home-entry-kind {
  top: 12px;
  left: 14px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--card-badge-text);
  background: var(--card-badge);
  border-color: var(--card-badge-border);
  padding: 5px 10px;
}
html[data-theme] .home-entry-open {
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 17px;
  background: #e8d4a5;
  border-color: #dfc58e;
  color: #234435;
}
html[data-theme] .home-entry-body { padding: 0 20px 20px; }
html[data-theme] .home-entry-logo {
  width: 52px;
  height: 52px;
  margin-top: -22px;
  border: 2px solid var(--card-panel);
  border-radius: 13px;
  background: var(--card-monogram);
  color: var(--card-monogram-text);
  font-size: 27px;
  box-shadow: none;
}
html[data-theme] .home-entry-logo:has(img) { background: #fff; }
html[data-theme] .home-entry-logo img { padding: 5px; }
html[data-theme] .home-entry h3 {
  font-family: var(--font-ui);
  color: var(--card-title);
  font-size: 22px;
  font-weight: 650;
  line-height: 1.28;
  letter-spacing: -.5px;
  margin: 15px 0 8px;
}
html[data-theme] .home-entry-location {
  color: var(--card-meta);
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 13px;
}
html[data-theme] .home-entry-summary {
  color: var(--card-copy);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.75;
  min-height: 5.25em;
  max-height: 5.25em;
  margin-bottom: 18px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
html[data-theme] .home-entry-bottom {
  color: var(--card-meta);
  border-color: var(--card-line);
  font-size: 12px;
  line-height: 1.5;
  gap: 8px 12px;
  padding-top: 15px;
}
html[data-theme] .home-entry-bottom strong {
  color: var(--card-title);
  font-size: 18px;
}
html[data-theme] .home-entry-bottom strong>span,
html[data-theme] .home-entry-bottom>span:last-child { color: var(--card-accent); }
html[data-theme] .home-entry-bottom small { color: var(--card-meta); font-size: 12px; }
html[data-theme] .listing-card {
  background: var(--card-panel);
  border-color: var(--card-border);
}
html[data-theme] .listing-card h3 { color: var(--card-title); }
html[data-theme] .listing-summary { color: var(--card-copy); font-size: 14px; }
html[data-theme] .listing-location,html[data-theme] .listing-card .card-bottom {
  color: var(--card-meta);
  border-color: var(--card-line);
}
/* Footer rows share a center axis; mobile items form one calm centered column. */
html[data-theme] .footer-inner {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto auto;
  align-items: center;
  column-gap: 24px;
  row-gap: 12px;
  min-height: 104px;
  padding-block: 26px;
  line-height: 1.4;
  box-sizing: border-box;
}
html[data-theme] .footer-inner>* { margin: 0; min-width: 0; }
html[data-theme] .footer-inner .footer-brand {
  display: inline-flex;
  align-items: center;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -.8px;
}
html[data-theme] .footer-inner p {
  font-size: 13px;
  line-height: 1.5;
  max-width: none;
}
html[data-theme] .footer-inner .footer-help {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}
html[data-theme] .footer-inner>span {
  width: auto;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}
/* Mastheads keep their emerald background, so their text needs a local palette. */
html[data-theme] .page-masthead {
  --ui-text: #f3efde;
  --ui-muted: #ccdccf;
  --ui-accent: #e4c68d;
  color: var(--ui-text);
}
html[data-theme] .page-masthead .page-title { color: var(--ui-text); }
html[data-theme] .page-masthead p,
html[data-theme] .page-masthead .page-description { color: var(--ui-muted); }
html[data-theme] .page-masthead .eyebrow { color: var(--ui-accent); }
/* Old small-button and hover rules used different padding. Fix both states. */
html[data-theme] .site-header :is(.header-account,.header-account:hover,.header-account:focus-visible) {
  padding: 10px 16px;
  min-height: 44px;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 650;
  gap: 9px;
  border-width: 1px;
  transform: none;
  animation: none;
  box-shadow: none;
  transition: background-color .15s ease,color .15s ease,border-color .15s ease;
}
@media(max-width:900px) {
  html[data-theme] .footer-inner { grid-template-columns: auto minmax(0,1fr); }
  html[data-theme] .footer-inner>span { justify-self: end; }
}
@media(max-width:760px) {
  html[data-theme] .home-entry-body { padding: 0 16px 18px; }
  html[data-theme] .home-entry h3 { font-size: 20px; }
  html[data-theme] .home-entry-summary { font-size: 13px; }
  html[data-theme] .home-entry-cover.has-feature { height: 150px; padding: 42px 12px 16px; }
  html[data-theme] .home-entry-feature { max-height: 92px; height: 92px; padding: 8px; }
  html[data-theme] .home-entry-cover .home-entry-kind { left: 10px; font-size: 10px; padding: 4px 8px; }
  html[data-theme] .home-entry-open { right: 10px; width: 27px; height: 27px; font-size: 15px; }
  html[data-theme] .home-entry-bottom { font-size: 11px; }
}
@media(max-width:600px) {
  html[data-theme] .footer-inner {
    grid-template-columns: minmax(0,1fr);
    justify-items: center;
    text-align: center;
    gap: 14px;
    padding-block: 28px;
    min-height: 0;
  }
  html[data-theme] .footer-inner p { max-width: 300px; }
  html[data-theme] .footer-inner>span { justify-self: center; }
}
@media(prefers-reduced-motion:reduce) {
  html[data-theme] .home-entry { transition: none; }
}

/* Checkbox baseline and support use the same measured spacing in both themes. */
html[data-theme] .checkbox-field label { align-items:center; }
html[data-theme] .checkbox-field input[type=checkbox] { margin:0; align-self:center; }
.help-widget { position:fixed; right:24px; bottom:24px; z-index:60; }
.help-widget>summary { display:flex; align-items:center; gap:8px; list-style:none; cursor:pointer; padding:12px 17px; border:1px solid #bfa66f; border-radius:999px; background:#173c2d; color:#f3dfb0; box-shadow:0 6px 20px #08251d25; font-size:13px; font-weight:600; }
.help-widget>summary::-webkit-details-marker { display:none; }
.help-widget svg { width:20px;height:20px; }
.help-popover { position:absolute; right:0; bottom:60px; width:min(330px,calc(100vw - 32px)); padding:22px; background:var(--ui-surface); color:var(--ui-text); border:1px solid var(--ui-border); border-radius:18px; box-shadow:0 14px 40px #08251d35; }
.help-popover strong { display:block; font-size:18px; }
.help-popover p,.help-popover small { color:var(--ui-muted);line-height:1.6; }
.help-popover .button { width:100%;margin:10px 0 16px; }
.help-popover small { display:block;margin-top:16px; }
.support-page { max-width:1120px; }
.support-layout { display:grid;grid-template-columns:1.2fr 1fr;gap:24px; }
.support-faq details { padding:16px 0;border-bottom:1px solid var(--ui-border); }
.support-faq summary { cursor:pointer;font-weight:600;line-height:1.6; }
.support-faq p { line-height:1.8;color:var(--ui-muted); }
.support-row { display:flex;flex-direction:column;gap:8px;padding:18px 0;border-bottom:1px solid var(--ui-border);color:var(--ui-text);text-decoration:none;overflow-wrap:anywhere; }
.support-row span { font-size:13px;color:var(--ui-muted); }
.support-thread,.support-reply { margin:24px 0; }
.support-message { padding:20px;border-radius:14px;background:var(--ui-raised);margin-bottom:16px;overflow-wrap:anywhere; }
.support-message-team { border-left:3px solid var(--ui-accent); }
.support-message header { display:flex;justify-content:space-between;gap:12px;margin-bottom:12px; }
.support-message time { color:var(--ui-muted);font-size:12px; }
.support-message>div { line-height:1.8; }
.support-actions { margin-top:20px; }
.support-tabs { display:flex;flex-wrap:wrap;gap:20px;margin:24px 0; }
.support-tabs a { color:var(--ui-accent); }
@media(max-width:760px) { .help-widget { right:16px;bottom:calc(90px + env(safe-area-inset-bottom)); }.support-layout { grid-template-columns:1fr; }.support-message header { flex-direction:column; }.support-message { padding:16px; } }
html[data-theme] .checkbox-field input[type=checkbox] { min-height:20px; max-height:20px; height:20px; width:20px; padding:0; border-radius:4px; box-shadow:none; }
/* A quiet geometric gold ornament stays away from text and form fields. */
html[data-theme] .page-masthead,html[data-theme] .home-guide { background-image:url('/static/img/gold-ornament.svg'),linear-gradient(125deg,#244d37,#153a2b);background-repeat:no-repeat;background-position:right center,center;background-size:240px 100%,cover; }
html[data-theme] .site-footer { background-image:url('/static/img/gold-ornament.svg');background-repeat:no-repeat;background-position:right center;background-size:180px 100%; }
@media(max-width:600px) { html[data-theme] .page-masthead,html[data-theme] .home-guide { background-size:100px 100%,cover; }.help-widget>summary { padding:10px 13px; } }
.help-widget:not([open]) .help-popover { display:none; }
html[data-theme] .catalog-filters,html[data-theme] .catalog-search { background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-border); }
html[data-theme] .auth-form input:not([type=checkbox]):not([type=radio]):not([type=hidden]),html[data-theme] .auth-form select,html[data-theme] .auth-form textarea { background:var(--ui-raised);color:var(--ui-text);border-color:var(--ui-border); }
html[data-theme] .catalog-form { background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-border); }
html[data-theme] .catalog-form .filter-row label { color:var(--ui-muted); }
