/* Dylan Stein Acupuncture — restored clinic information portal
   reference: medical-clinic-portal | layout family: dsa-fifthave-clinic-taskband-with-visit-rail */

:root {
  --canvas: #ffffff;
  --field: #eef1e5;
  --ink: #22261f;
  --muted: #565d52;
  --accent: #17514a;
  --brand: #4f6828;
  --notice-ink: #8a4413;
  --notice-field: #fbf1e8;
  --rule: #cfd6c6;
  --rule-light: #e2e6da;
  --serif: Georgia, "Times New Roman", "Liberation Serif", serif;
  --sans: Arial, "Helvetica Neue", Helvetica, "Liberation Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 16.5px/1.62 var(--sans);
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; border: 0; }
a { color: var(--accent); }
a:hover { color: #0f3a34; }
h1, h2, h3, h4, h5 { font-family: var(--serif); font-weight: 400; line-height: 1.24; margin: 0 0 12px; }
p, ul, ol, dl, table, figure { margin: 0 0 16px; }
figure { margin-inline: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.shell { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 20;
  background: var(--accent); color: #fff; padding: 10px 16px; text-decoration: none;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- utility strip (phone / address / hours) ---------- */
.utility { background: var(--accent); color: #fff; font-size: 13.5px; }
.utility a { color: #fff; }
.utility-inner { display: flex; flex-wrap: wrap; gap: 8px 32px; padding-block: 9px; }
.utility-item { margin: 0; }
.ulabel {
  font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-right: 6px;
}
.utility .ulabel { color: #c6d8d3; }

/* ---------- masthead ---------- */
.masthead { border-bottom: 1px solid var(--rule); background: var(--canvas); }
.masthead-inner {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding-block: 20px;
}
.brandmark { display: block; line-height: 0; }
.brandmark img { width: 300px; height: auto; }
.brandtext { border-left: 1px solid var(--rule); padding-left: 24px; }
.brandname { font-family: var(--serif); font-size: 28px; letter-spacing: .01em; margin: 0 0 2px; }
.brandline { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- patient task band ---------- */
.taskband { background: var(--field); border-bottom: 1px solid var(--rule); }
.taskband-inner { display: flex; flex-wrap: wrap; padding: 0; }
.task {
  display: block; padding: 13px 18px; font-size: 14.5px; text-decoration: none;
  color: var(--ink); border-right: 1px solid var(--rule); min-height: 44px;
}
.task:hover { background: #e3e8d7; color: var(--ink); }
.task.current { background: var(--canvas); color: var(--accent); font-weight: 700; box-shadow: none; }

/* ---------- homepage opening ---------- */
main { display: block; padding-block: 32px 48px; }
.opening { display: grid; grid-template-columns: 7fr 5fr; gap: 32px; align-items: start; }
.intro h1 { font-size: 40px; margin-bottom: 16px; }
.lede { font-size: 18px; color: #2c332a; }
.intro p { max-width: 36em; }
.intro-figure {
  margin-top: 24px; border-top: 1px solid var(--rule); padding-top: 16px; max-width: 420px;
}
.intro-figure img { width: 100%; border: 1px solid var(--rule); padding: 4px; background: #fff; }
figcaption { font-size: 13.5px; color: var(--muted); margin-top: 8px; }

/* ---------- visit information panel ---------- */
.visit-panel { background: var(--field); border: 1px solid var(--rule); padding: 20px; }
.panel-title {
  font-family: var(--sans); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin: 0 0 12px;
  border-bottom: 1px solid var(--rule); padding-bottom: 8px;
}
.seal {
  display: inline-block; width: 15px; height: 15px; margin-right: 8px; vertical-align: -2px;
  background: url("/assets/seal.png") no-repeat center / contain;
}
.footer-base .seal { width: 14px; height: 14px; vertical-align: -2px; }
.visit-fields { margin: 0 0 16px; font-size: 15px; }
.visit-fields dt {
  font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-top: 12px;
}
.visit-fields dt:first-child { margin-top: 0; }
.visit-fields dd { margin: 2px 0 0; }
.notice {
  background: var(--notice-field); border-left: 3px solid var(--notice-ink);
  color: var(--notice-ink); padding: 12px 14px; font-size: 15px; margin: 16px 0;
}
.visit-links { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.visit-links li { border-top: 1px solid var(--rule); padding: 8px 0; }

/* ---------- department index ---------- */
.rule-title {
  display: flex; align-items: center; gap: 12px; font-size: 26px;
  border-bottom: 2px solid var(--accent); padding-bottom: 8px; margin: 48px 0 8px;
}
.rule-title > span:first-child { flex: 0 0 auto; }
.rule-title .seal { margin-left: auto; margin-right: 0; width: 19px; height: 19px; }
.dept-row {
  display: grid; grid-template-columns: 220px 1fr; gap: 24px;
  border-top: 1px solid var(--rule); padding: 24px 0;
}
.dept-row:first-of-type { border-top: 0; }
.dept-label h3 { font-size: 22px; margin: 0; }
.dept-label a { text-decoration: none; }
.dept-label a:hover { text-decoration: underline; }
.dept-body p { margin: 0 0 12px; max-width: 46em; }
.cond-index { columns: 3; column-gap: 24px; list-style: none; margin: 0; padding: 0; font-size: 15px; }
.cond-index li { break-inside: avoid; padding: 3px 0; }

/* ---------- providers ---------- */
.provider-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 24px; }
.provider-record { display: grid; grid-template-columns: 132px 1fr; gap: 20px; }
.portrait { width: 132px; border: 1px solid var(--rule); padding: 4px; background: #fff; }
.provider-body h3 { font-size: 21px; margin-bottom: 8px; }
.creds { list-style: none; margin: 0 0 12px; padding: 0; font-size: 14.5px; color: var(--muted); }
.creds li { border-top: 1px solid var(--rule-light); padding: 6px 0; }
.focus { font-size: 15px; margin-bottom: 8px; }

/* ---------- resources ---------- */
.resource-list { list-style: none; margin: 24px 0 16px; padding: 0; }
.resource-list li {
  display: grid; grid-template-columns: 140px 1fr 180px; gap: 16px; align-items: baseline;
  border-top: 1px solid var(--rule-light); padding: 10px 0;
}
.resource-list time { font-size: 13.5px; color: var(--muted); }
.resource-list a { text-decoration: none; }
.resource-list a:hover { text-decoration: underline; }
.byline { font-size: 13.5px; color: var(--muted); }
.more { font-size: 15px; }

/* ---------- tables ---------- */
.scroll-x { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
caption { text-align: left; font-size: 13.5px; color: var(--muted); padding-bottom: 8px; }
th, td { text-align: left; padding: 9px 12px; border-top: 1px solid var(--rule-light); vertical-align: top; }
thead th { border-top: 0; border-bottom: 1px solid var(--rule); font-family: var(--sans);
  font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.access-table th[scope="row"] {
  width: 200px; background: var(--field); font-family: var(--sans); font-size: 13px;
  letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--ink);
}
.access-line { font-size: 15px; color: var(--muted); }
.archive-table .c-date { width: 150px; color: var(--muted); font-size: 14px; }
.archive-table .c-by { width: 180px; color: var(--muted); font-size: 14px; }

/* ---------- inner pages ---------- */
.page-shell { padding-block: 20px 48px; }
.breadcrumb { font-size: 13.5px; margin-bottom: 16px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "/"; color: var(--muted); margin-right: 8px; }
.page-grid { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }
.page-body h1 { font-size: 38px; margin-bottom: 16px; }
.page-body { max-width: 44em; }
.page-body h2 { font-size: 24px; margin-top: 32px; }
.page-body h3 { font-size: 19px; margin-top: 24px; }
.page-body img { border: 1px solid var(--rule); padding: 4px; background: #fff; margin: 8px 0; }
.page-body ul, .page-body ol { padding-left: 22px; }
.page-body li { margin-bottom: 6px; }
.dateline { font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }
.dateline .sep { margin: 0 6px; }
.cats { font-size: 14px; color: var(--muted); border-top: 1px solid var(--rule-light); padding-top: 12px; }
.prevnext-nav { display: flex; flex-wrap: wrap; gap: 16px; border-top: 1px solid var(--rule); padding-top: 16px; }
.prevnext { flex: 1 1 240px; font-size: 15px; text-decoration: none; }
.prevnext.next { text-align: right; }
.prevnext:hover { text-decoration: underline; }
.cond-rail { background: var(--canvas); border: 1px solid var(--rule); padding: 16px 20px; margin-bottom: 24px; }
.cond-rail ul { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.cond-rail li { border-top: 1px solid var(--rule-light); padding: 7px 0; }
.cond-rail li:first-child { border-top: 0; }
.map-list { list-style: none; margin: 0 0 24px; padding: 0; columns: 2; column-gap: 32px; font-size: 15.5px; }
.map-list li { break-inside: avoid; padding: 4px 0; }
.map-block { margin-bottom: 24px; }
.year-block { margin-bottom: 8px; }

/* ---------- footer ---------- */
.site-footer { background: var(--field); border-top: 1px solid var(--rule); margin-top: 48px; padding-block: 32px 0; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.footer-h { font-family: var(--sans); font-size: 12.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: 10px; }
.footer-block p { font-size: 15px; margin-bottom: 12px; }
.footer-list { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.footer-list li { padding: 4px 0; }
.footer-base { border-top: 1px solid var(--rule); margin-top: 32px; padding-block: 16px; }
.footer-base p { font-size: 14px; color: var(--muted); margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .cond-index { columns: 2; }
  .provider-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .opening { grid-template-columns: 1fr; }
  .page-grid { grid-template-columns: 1fr; gap: 32px; }
  .page-body { max-width: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .intro h1 { font-size: 34px; }
}
@media (max-width: 760px) {
  .shell { padding: 0 16px; }
  .utility-inner { flex-direction: column; gap: 4px; }
  .masthead-inner { gap: 12px; }
  .brandmark img { width: 232px; }
  .brandtext { border-left: 0; padding-left: 0; }
  .brandname { font-size: 24px; }
  .taskband-inner { display: grid; grid-template-columns: 1fr 1fr; padding: 0; }
  .task { border-bottom: 1px solid var(--rule); text-align: left; }
  .dept-row { grid-template-columns: 1fr; gap: 12px; }
  .cond-index { columns: 1; }
  .provider-record { grid-template-columns: 1fr; }
  .portrait { width: 160px; }
  .resource-list li { grid-template-columns: 1fr; gap: 2px; }
  .access-table, .access-table tbody, .access-table tr, .access-table th, .access-table td,
  .access-table caption {
    display: block; width: auto;
  }
  .access-table th[scope="row"] { width: auto; margin-top: 12px; }
  .access-table td { border-top: 1px solid var(--rule-light); }
  .archive-table, .archive-table tbody, .archive-table tr, .archive-table td,
  .archive-table caption { display: block; width: auto; }
  .archive-table thead { display: none; }
  .archive-table tr { border-top: 1px solid var(--rule-light); padding: 10px 0; }
  .archive-table td { border-top: 0; padding: 0; }
  .archive-table .c-title { font-size: 16.5px; padding: 2px 0; }
  .archive-table .c-date, .archive-table .c-by { width: auto; font-size: 13.5px; }
  .page-body h1 { font-size: 28px; }
  .intro h1 { font-size: 30px; }
  .rule-title { font-size: 22px; margin-top: 36px; }
  .map-list { columns: 1; }
  .prevnext.next { text-align: left; }
}
@media (max-width: 420px) {
  body { font-size: 16px; }
  .page-body h1, .intro h1 { font-size: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
