/* Surfaces, cards and accents follow the Asigurări Germania resource pages. */
.directory-page,
.reader-page,
.interior-canvas {
  --surface-dim: #f8fafc;
  --ink: #1e293b;
  --muted: #52647b;
  --line: #e2e8f0;
  --blue: #4f46e5;
  background: var(--surface-dim);
  font-family: var(--font-body, Inter, sans-serif);
}
.directory-page :is(h2, h3),
.reader-page :is(h2, h3),
.interior-canvas :is(h2, h3),
.legalpage :is(h2, h3) { font-family: var(--font-display, Georgia, serif); font-style: normal; }
.interior-band {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}
.directory-intro {
  padding-block: clamp(24px, 3vw, 40px);
}
.directory-intro h1,
.reader-intro h1,
.workspace-intro h1,
.contact-intro h1,
.legalpage h1 {
  color: #1e293b;
  font-family: var(--font-display, Georgia, serif);
  font-style: normal;
  font-weight: 600;
  letter-spacing: -.038em;
  line-height: 1.12;
  text-wrap: balance;
}
.directory-intro h1 { max-width: 35ch; font-size: clamp(1.95rem, 3.15vw, 2.55rem); }
.directory-intro .lead { max-width: 68ch; margin: 12px 0 0; font-size: 1rem; }
.resource-links { display: flex; flex-wrap: wrap; gap: 2px 22px; margin-top: 7px; }
.resource-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: #4338ca;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 650;
}
.resource-links a:hover { text-decoration: underline; }
.directory-entries { padding-block: clamp(22px, 3vw, 38px) clamp(44px, 6vw, 76px); }
.editorial-cards { gap: clamp(15px, 1.8vw, 24px); }
.editorial-cards .story {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 3px #0f172a0b, inset 0 1px #ffffffcc;
  transition: border-color .22s, box-shadow .22s, transform .22s;
}
.editorial-cards .story:focus-visible { outline-offset: 3px; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .editorial-cards .story:hover {
    border-color: #c7d2fe;
    transform: translateY(-2px);
    box-shadow: 0 14px 36px #0f172a14, 0 4px 12px #0f172a0a;
  }
}
.editorial-cards .story-copy { min-width: 0; padding: clamp(18px, 2.2vw, 28px); align-items: flex-start; }
.editorial-cards .story-topic {
  margin-bottom: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  padding: 4px 10px;
  font-size: .72rem;
  line-height: 1.45;
  font-weight: 650;
}
.editorial-cards .story-blog .story-topic { position: absolute; top: 12px; left: 12px; box-shadow: 0 1px 3px #0f172a13; }
.editorial-cards :is(h2, h3) {
  color: #0f172a;
  font: 650 clamp(1.25rem, 1.75vw, 1.6rem)/1.22 var(--font-display, Georgia, serif);
  letter-spacing: -.028em;
  text-wrap: pretty;
}
.editorial-cards .story:hover :is(h2, h3) { color: #4338ca; }
.editorial-cards .story p { margin: 10px 0 16px; color: #475569; font-size: .91rem; line-height: 1.62; }
.editorial-cards .story .text-link { color: #4338ca; font-size: .86rem; }
.editorial-cards .story-image { aspect-ratio: 1.9; height: auto; }
.editorial-cards .story-guide { border-radius: 20px; }
.editorial-cards .story-guide .iconbox {
  margin: 21px 0 0 21px;
  width: 44px;
  height: 44px;
  border: 1px solid #dbe1ff;
  border-radius: 12px;
  color: #4f46e5;
  background: linear-gradient(135deg, #e0e7ff, #ede9fe);
}
.editorial-cards .story-guide .story-copy { padding-top: 14px; }
.editorial-cards .story-guide .story-topic {
  padding: 0;
  border: 0;
  color: #4338ca;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.directory-blog .editorial-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: clamp(14px, 2.5vw, 36px);
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  background: linear-gradient(130deg, #fff, #f8fafc);
  box-shadow: 0 22px 60px -30px #0f172a28, inset 0 1px #fff;
}
.directory-blog .story:first-child .text-link {
  padding: 10px 16px;
  border-radius: 12px;
  color: #fff;
  background: #4f46e5;
  box-shadow: 0 4px 12px #4f46e530;
}
@media (min-width: 761px) {
  .directory-blog .story:first-child {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-column: 1/-1;
    min-height: clamp(260px, 26vw, 330px);
  }
  .directory-blog .story:first-child .story-image { width: 100%; height: 100%; position: absolute; inset: 0 auto 0 0; max-width: 50%; }
  .directory-blog .story:first-child .story-copy { grid-column: 2; padding: clamp(23px, 3vw, 40px); justify-content: center; }
  .directory-blog .story:first-child .text-link { margin-top: 2px; }
  .directory-blog .story:first-child h2 { font-size: clamp(1.45rem, 2.35vw, 1.9rem); }
}

.reader-heading { padding-block: clamp(24px, 3.5vw, 48px); }
.reader-blog .reader-heading { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 4vw, 54px); }
.reader-cover { width: 100%; aspect-ratio: 1200/630; height: auto; object-fit: cover; border-radius: 16px; border: 1px solid #e2e8f0; }
.reader-kind {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  border: 1px solid #c7d2fe;
  border-radius: 100px;
  padding: 7px 13px;
  background: #eef2ff;
  color: #3730a3;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
/* One reading column plus a desktop contents rail, in document order on mobile. */
.reader-page { background: #f8fafc; }
.reader-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 19rem);
  grid-template-areas: "body toc";
  column-gap: clamp(22px, 3vw, 48px);
  row-gap: 0;
  padding-block: clamp(30px, 4.8vw, 65px) clamp(48px, 6vw, 84px);
  justify-content: space-between;
}
.reader-intro { width: 100%; padding: 0; border: 0; }
.reader-intro h1 { max-width: 36ch; font-size: clamp(1.9rem, 3vw, 2.5rem); }
.reader-intro .lead { margin: 14px 0 16px; max-width: 70ch; font-size: 1.02rem; line-height: 1.67; }
.reader-intro .kicker { margin-bottom: 16px; }
.reader-by { display: flex; flex-wrap: wrap; gap: 4px 15px; margin: 0; font-size: .78rem; }
.reader-by b { color: var(--ink); font-weight: 650; }
.reader-by span { padding: 0; }
.reader-toc {
  grid-area: toc;
  position: sticky;
  top: 24px;
  margin: 0;
  padding: 0;
  display: block;
  border: 1px solid var(--line);
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 20px #152e4f09;
  overflow: auto;
  max-height: calc(100vh - 48px);
}
.reader-toc .toc-desktop { padding: 14px 20px 12px; }
.reader-toc .toc-desktop strong { font-family: var(--font-display, Georgia, serif); font-size: 1.4rem; }
.reader-toc ul, .reader-body :is(.reference-list, .related-list) {
  list-style: none;
  margin: 0;
  padding: 0;
}
.reader-toc li + li { border-top: 1px solid #e4eaf3; }
.reader-toc li a { padding-block: 9px; color: var(--muted); text-decoration: none; line-height: 1.46; }
.reader-toc li a:hover { color: var(--blue); text-decoration: underline; }
.reader-toc .toc-tool {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: #eef4ff;
  font-size: .87rem;
  font-weight: 650;
  text-decoration: none;
}
.toc-tool:hover { text-decoration: underline; }
.toc-tool .ico:last-child { margin-left: auto; }
.reader-toc .toc-mobile { display: none; }
.reader-body {
  grid-area: body;
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #fff;
  padding: clamp(20px, 3.6vw, 48px);
  box-shadow: 0 12px 40px -28px #0f172a25;
}
.reader-body > :first-child > h2:first-child { margin-top: 0; }
.reader-body h2, .workspace-tool .sheet h3 {
  font-size: clamp(1.72rem, 2.6vw, 2.25rem);
  line-height: 1.12;
  text-wrap: pretty;
  margin: 1.4em 0 .45em;
}
.reader-body p, .reader-body li { line-height: 1.78; }
.reader-body li::marker, .workspace-tool .sheet li::marker { color: var(--blue); }
.reader-body section { scroll-margin-top: 18px; }
.reader-body .example, .reader-body blockquote, .workspace-tool .sheet blockquote {
  padding: clamp(18px, 2.5vw, 28px);
  border: 1px solid #cfdef3;
  border-left: 3px solid #436ccb;
  border-radius: 0 12px 12px 0;
  margin: 1.7em 0;
  background: #f5f6ff;
}
.reader-body .example b { color: #284f88; }
.reader-body .example p { margin-top: 5px; }
.reader-body blockquote, .workspace-tool .sheet blockquote {
  margin: .8em 0 1.6em;
  color: #223852;
  font: 500 1.02rem/1.7 var(--font-body, Inter, sans-serif);
}
.reader-body :is(.reference-list, .related-list) li { border-bottom: 1px solid var(--line); margin: 0; }
.reader-body :is(.reference-list, .related-list) a {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  min-height: 45px;
  padding: 11px 0;
  text-decoration: none;
  line-height: 1.5;
}
.reader-body .reference-list a { font-size: .91rem; }
.reader-body .related-list a { color: var(--ink); font-weight: 610; }
.reader-body :is(.reference-list, .related-list) a:hover span { text-decoration: underline; }
.reader-body .calc-ref .ico, .policy-link .ico { vertical-align: middle; width: 1em; height: 1em; }
.reader-body .article-cta {
  margin: clamp(32px, 4vw, 50px) 0 0;
  padding: clamp(21px, 3vw, 32px);
  border: 1px solid #d6dcff;
  border-radius: 20px;
  background: linear-gradient(120deg, white, #eef2ff);
}
.reader-body .article-cta h2 { margin-top: 0; }

/* Keep phone-sized fields and result sheets inside the viewport. */
.interior-canvas { background: radial-gradient(70% 50% at 95% 0, #eef2ff, transparent 78%), #f8fafc; }
.workspace-tool, .workspace-contact { max-width: 1192px; padding-block: clamp(28px, 4.6vw, 64px) clamp(46px, 6vw, 84px); }
.workspace-grid, .workspace-contact .contact-grid {
  display: grid;
  align-items: start;
  gap: clamp(26px, 5vw, 76px);
}
.workspace-grid { grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); }
.workspace-intro { padding-top: 12px; }
.workspace-intro h1, .contact-intro h1 { font-size: clamp(2.03rem, 3.5vw, 2.9rem); }
.workspace-intro .lead { max-width: 38ch; margin: 17px 0 22px; }
.browser-note {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  max-width: 40ch;
  font-size: .88rem;
  line-height: 1.6;
  color: #445d80;
}
.browser-note .ico { margin-top: 4px; color: var(--blue); }
.workspace-fields, .workspace-grid > *, .workspace-contact .contact-grid > * { min-width: 0; }
.workspace-tool .toolbox, .workspace-contact .toolbox, .workspace-tool .sheet {
  margin: 0;
  padding: clamp(19px, 3vw, 37px);
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: white;
  box-shadow: 0 12px 40px -20px #4f46e521;
}
.workspace-tool .toolbox h2 { margin-bottom: 22px; font-size: 1.96rem; }
.workspace-tool .fieldgrid { display: grid; grid-template-columns: 1fr; gap: 0; }
.workspace-tool .field, .workspace-contact .field { min-width: 0; gap: 7px; margin-bottom: 20px; }
.workspace-tool .field select, .workspace-contact .field :is(select, input) {
  min-width: 0;
  min-height: 48px;
  border-color: #a4b3c8;
  color: #142c4f;
  padding-inline: 12px;
}
.workspace-tool .toolbox .btn, .workspace-contact .toolbox .btn { margin: 0; min-height: 48px; }
.workspace-tool .sheet { max-width: 80ch; margin: clamp(26px, 4vw, 52px) auto 0; }
.workspace-tool .sheet h2 { margin-top: 0; }
.workspace-tool .sheet details {
  margin: 1.3em 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafd;
}
.workspace-tool .sheet summary { min-height: 32px; padding-block: 4px; color: #234270; font-weight: 630; }
.workspace-tool .sheet .secondary { color: var(--ink); background: white; border-color: var(--line); }
.workspace-tool .sheet .secondary:hover { border-color: #8d9eb5; background: #f8fafd; }
.workspace-tool .sheet .actions { margin-top: 24px; }
.contact-intro { margin-bottom: clamp(22px, 3vw, 36px); }
.contact-intro .lead { margin-bottom: 0; }
.workspace-contact .contact-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, .85fr); gap: clamp(22px, 3.5vw, 48px); }
.workspace-contact .pills label { padding-inline: 15px; }
.workspace-contact .pills input { margin: 0; }
.workspace-contact .formnote, .fallback-note {
  margin: 0 0 21px;
  padding: 12px 15px;
  border-left: 3px solid #6f8eb8;
  background: #eef3fa;
  color: #344c6d;
  line-height: 1.55;
}
.workspace-contact .consent-row { border-top: 1px solid var(--line); padding: 4px 0 7px; }
.workspace-contact .agree { min-height: 44px; }
.workspace-contact .office-card {
  align-self: start;
  margin: 0;
  padding: clamp(20px, 2.7vw, 34px);
  border: 1px solid #d9def7;
  border-radius: 20px;
  background: linear-gradient(145deg, #fff, #f0f2ff);
  box-shadow: 0 12px 40px -24px #4f46e52e;
}
.office-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.office-card-head .ico { width: 26px; height: 26px; color: #2d56a7; }
.office-card-head h2 { font-size: clamp(1.65rem, 2.4vw, 2.1rem); }
.office-card address { font-style: normal; color: #344a69; line-height: 1.65; }
.office-card address b { color: var(--ink); }
.office-card .office-email { display: inline-block; padding-block: 8px; }
.office-card p { margin: 15px 0; padding-top: 18px; border-top: 1px solid #cbd8e8; font-size: .95rem; }
.workspace-contact #feedback { overflow-wrap: anywhere; }

.directory-page .crumb a, .reader-page .crumb a { display: inline-flex; align-items: center; min-height: 36px; }
.legalpage { max-width: 72ch; }
.legalpage h1 { font-size: clamp(1.95rem, 3.4vw, 2.75rem); }
.legalpage h2 { border-top: 1px solid #e2e8f0; padding-top: 20px; }

@media (max-width: 920px) {
  .reader-layout { column-gap: 24px; grid-template-columns: minmax(0, 1fr) minmax(210px, .45fr); }
  .workspace-grid { gap: 30px; }
}
@media (max-width: 760px) {
  .reader-layout { display: flex; flex-direction: column; gap: 0; }
  .reader-intro { border: 0; }
  .reader-layout { padding-top: 20px; }
  .reader-blog .reader-heading { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .reader-body { width: 100%; margin-top: 12px; padding: 20px 16px; }
  .reader-page .crumb > [aria-current], .reader-page .crumb > span:has(+ [aria-current]) {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
  }
  .interior-band {
    margin-inline: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 12px 30px -22px #4f46e526;
  }
  .directory-blog .editorial-cards {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
    border-radius: 18px;
  }
  .reader-toc {
    position: static;
    flex: none;
    width: 100%;
    padding: 0;
    margin: 0 0 6px;
    max-height: none;
    overflow: visible;
    box-shadow: none;
  }
  .reader-toc .toc-desktop, .reader-toc > .toc-tool { display: none; }
  .toc-mobile .toc-tool { border-radius: 0 0 15px 15px; }
  .reader-toc .toc-mobile { display: block; }
  .toc-mobile summary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 15px;
    border-radius: 15px;
    color: #25457a;
    font-weight: 670;
    list-style: none;
  }
  .toc-mobile summary::-webkit-details-marker { display: none; }
  .toc-mobile summary .ico:last-child { width: 15px; margin-left: auto; transform: rotate(90deg); }
  .toc-mobile[open] summary .ico:last-child { transform: rotate(-90deg); }
  .toc-mobile nav { padding-inline: 15px; border-top: 1px solid var(--line); }
  .toc-mobile li a { display: flex; align-items: center; min-height: 44px; }
  .workspace-grid, .workspace-contact .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .workspace-intro { padding-top: 0; }
  .workspace-intro .lead { max-width: 64ch; margin: 11px 0; }
  .browser-note { max-width: 58ch; margin: 0; }
  .workspace-contact #window-field small { margin-top: -5px; }
}
@media (max-width: 730px) {
  .directory-blog .editorial-cards { grid-template-columns: minmax(0, 1fr); }
  .directory-intro .lead, .reader-intro .lead, .contact-intro .lead { margin-top: 12px; }
  .reader-intro h1 { font-size: clamp(1.83rem, 6.4vw, 2.25rem); }
  .reader-intro .lead { margin-bottom: 16px; }
  .reader-by { gap: 2px 12px; }
  .editorial-cards .story-copy { padding: 19px; }
  .editorial-cards .story-image { aspect-ratio: 2.2; }
  .editorial-cards .story-guide {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: start;
    column-gap: 13px;
    padding: 19px;
  }
  .editorial-cards .story-guide .iconbox { margin: 0; width: 36px; height: 36px; border-radius: 10px; }
  .editorial-cards .story-guide .story-copy { padding: 0; }
  .editorial-cards .story-guide .story-topic { margin-bottom: 4px; }
  .editorial-cards .story-guide p { margin: 8px 0 10px; }
  .workspace-tool .toolbox, .workspace-contact .toolbox { border-radius: 14px; }
  .workspace-tool .sheet .actions { align-items: stretch; }
}
@media (max-width: 440px) {
  .workspace-tool .toolbox .btn, .workspace-contact .toolbox .btn,
  .workspace-tool .sheet .actions .btn { width: 100%; }
  .workspace-contact .pills { gap: 6px; }
  .workspace-contact .pills label { padding-inline: 9px; }
}
@media print {
  .navigator-page, .reader-page { background: white; }
  .reader-band, .reader-body { border: 0; background: white; box-shadow: none; }
  .reader-kind, .reader-cover { display: none; }
  .reader-heading, .reader-blog .reader-heading { display: block; padding: 0; }
  .workspace-tool:has(.sheet:not([hidden])) .workspace-grid { display: none !important; }
  .workspace-tool, .workspace-tool .sheet, .reader-layout, .reader-intro, .reader-body {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
  .workspace-tool .sheet details { break-inside: avoid; background: transparent; }
  .workspace-tool .sheet h3 { font-size: 14pt; margin: 12pt 0 5pt; }
  .workspace-tool .sheet blockquote, .reader-body blockquote { padding: 8pt 12pt; font-size: 10pt; }
}
