/* Morris Brako, personal site
   Shared stylesheet. Warm paper by default, pine and charcoal in dark mode. */

:root {
  --bg:         #F6F2EA;
  --bg-alt:     #EFE9DC;
  --card:       #FFFCF6;
  --ink:        #191E1A;
  --ink-soft:   #333D37;
  --muted:      #6C7A72;
  --accent:     #1F4E45;
  --accent-2:   #163A34;
  --accent-dim: rgba(31, 78, 69, 0.08);
  --brass:      #96702F;
  --line:       #DFD8C8;
  --line-soft:  #E9E3D6;
  --shadow:     rgba(25, 30, 26, 0.5);
  --grain:      0.038;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap:  960px;
  --ease:  cubic-bezier(0.22, 0.61, 0.36, 1);
}

:root[data-theme="dark"] {
  --bg:         #131714;
  --bg-alt:     #181E19;
  --card:       #1C231E;
  --ink:        #EDEFE9;
  --ink-soft:   #C8D0C9;
  --muted:      #91A199;
  --accent:     #7CBFAE;
  --accent-2:   #9BD3C4;
  --accent-dim: rgba(124, 191, 174, 0.12);
  --brass:      #CDA65E;
  --line:       #2C332E;
  --line-soft:  #232A25;
  --shadow:     rgba(0, 0, 0, 0.7);
  --grain:      0.05;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

/* Paper grain, so the background never reads as flat white */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

body > * { position: relative; z-index: 1; }

img { max-width: 100%; height: auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff;
  padding: 10px 16px; z-index: 200; border-radius: 0 0 4px 0;
}
.skip:focus { left: 0; top: 0; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px -22px var(--shadow);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 16px;
}

.brand {
  font-family: var(--serif);
  font-weight: 600; font-size: 18.5px;
  color: var(--ink); letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--accent); }

.nav-desktop { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-desktop a {
  position: relative;
  color: var(--muted); font-size: 15px; font-weight: 500;
  padding: 8px 12px; border-radius: 4px;
  transition: color 0.2s var(--ease);
}
.nav-desktop a::after {
  content: ""; position: absolute;
  left: 12px; right: 12px; bottom: 3px; height: 2px;
  background: var(--brass);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.28s var(--ease);
}
.nav-desktop a:hover { color: var(--ink); text-decoration: none; }
.nav-desktop a:hover::after { transform: scaleX(1); }
.nav-desktop a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav-desktop a[aria-current="page"]::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 6px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: none; border: 1px solid transparent; border-radius: 6px;
  color: var(--muted); cursor: pointer; padding: 0;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.icon-btn:hover { color: var(--ink); background: var(--accent-dim); border-color: var(--line); }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }

.nav-toggle { display: none; }
.nav-toggle .bar { transition: transform 0.3s var(--ease), opacity 0.2s var(--ease); transform-origin: center; }
.nav-toggle[aria-expanded="true"] .bar-1 { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar-2 { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar-3 { transform: translateY(-6px) rotate(-45deg); }

.mobile-nav {
  display: none;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
}
.mobile-nav ul { list-style: none; margin: 0; padding: 8px 0 18px; }
.mobile-nav li { opacity: 0; transform: translateY(-6px); }
.mobile-nav.is-open li { animation: navIn 0.35s var(--ease) forwards; }
.mobile-nav li:nth-child(1) { animation-delay: 0.04s; }
.mobile-nav li:nth-child(2) { animation-delay: 0.08s; }
.mobile-nav li:nth-child(3) { animation-delay: 0.12s; }
.mobile-nav li:nth-child(4) { animation-delay: 0.16s; }
.mobile-nav li:nth-child(5) { animation-delay: 0.20s; }
.mobile-nav li:nth-child(6) { animation-delay: 0.24s; }
@keyframes navIn { to { opacity: 1; transform: none; } }
.mobile-nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; font-size: 19px; font-weight: 500;
  font-family: var(--serif);
  color: var(--ink); border-bottom: 1px solid var(--line-soft);
}
.mobile-nav a:hover { text-decoration: none; color: var(--accent); }
.mobile-nav a[aria-current="page"] { color: var(--accent); }
.mobile-nav a::after {
  content: ""; width: 7px; height: 7px;
  border-right: 1.6px solid var(--brass); border-top: 1.6px solid var(--brass);
  transform: rotate(45deg); opacity: 0.65;
}

@media (max-width: 860px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: inline-flex; }
  .mobile-nav { display: block; }
}

/* ---------- Reveal on scroll ---------- */

/* Content is visible by default. It is only hidden for the animation once the
   inline head script has confirmed JavaScript is running, so a blocked or slow
   script can never leave the page looking blank. */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .mobile-nav li { opacity: 1; transform: none; animation: none !important; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 88px 0 72px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(58% 78% at 78% 12%, var(--accent-dim), transparent 68%),
    radial-gradient(46% 62% at 6% 96%, color-mix(in srgb, var(--brass) 12%, transparent), transparent 70%);
}
.hero-grid {
  display: grid; grid-template-columns: 1fr 264px;
  gap: 52px; align-items: center;
}
.eyebrow {
  color: var(--brass); font-family: var(--serif);
  font-style: italic; font-size: 20px; margin: 0 0 12px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(42px, 8vw, 68px);
  line-height: 1.02; letter-spacing: -0.018em; margin: 0 0 10px;
}
.hero .role { font-size: 18px; color: var(--accent); font-weight: 600; margin: 0 0 20px; }
.lede { font-size: 19px; line-height: 1.55; max-width: 34em; color: var(--ink-soft); margin: 0 0 28px; }

.portrait-frame { position: relative; justify-self: end; }
.portrait-frame::before {
  content: ""; position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid var(--brass); opacity: 0.42; border-radius: 6px;
}
.portrait {
  position: relative;
  width: 264px; height: 264px; object-fit: cover;
  border-radius: 6px; border: 1px solid var(--line);
  box-shadow: 0 22px 44px -26px var(--shadow);
  display: block;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 4px;
  font-family: var(--sans); font-weight: 500; font-size: 15.5px;
  cursor: pointer; border: 1px solid transparent;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease), color 0.2s var(--ease);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-solid { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.btn-solid:hover { background: var(--accent-2); border-color: var(--accent-2); box-shadow: 0 12px 24px -14px var(--shadow); }
.btn-ghost { border-color: var(--accent); color: var(--accent); background: none; }
.btn-ghost:hover { background: var(--accent-dim); }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 760px) {
  .hero { padding: 56px 0 52px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .portrait-frame { justify-self: start; }
  .portrait { width: 188px; height: 188px; }
  .portrait-frame::before { inset: 10px -10px -10px 10px; }
}

/* Compact hero for sub-pages */
.page-hero { padding: 64px 0 44px; border-bottom: 1px solid var(--line); }
.page-hero .kicker {
  color: var(--brass); font-size: 13px; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase; margin: 0 0 12px;
}
.page-hero h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(36px, 6.5vw, 54px);
  line-height: 1.06; letter-spacing: -0.018em; margin: 0 0 16px;
}
.page-hero .lede { margin-bottom: 0; }

/* ---------- Sections ---------- */

section { padding: 64px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: none; }
.section-alt { background: var(--bg-alt); }

h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: 31px; letter-spacing: -0.012em; margin: 0 0 24px;
}
h2.ruled::before {
  content: ""; display: block;
  width: 42px; height: 3px; background: var(--brass);
  margin-bottom: 18px; border-radius: 2px;
}
p { margin: 0 0 18px; max-width: 42em; }
p:last-child { margin-bottom: 0; }

.subhead {
  font-family: var(--sans); font-weight: 600; font-size: 17px;
  color: var(--accent); margin: 36px 0 8px;
}
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.section-head h2 { margin-bottom: 0; }
.more-link { font-size: 15px; font-weight: 500; white-space: nowrap; }
.more-link::after { content: " \2192"; }

/* ---------- Tip of the day ---------- */

.tip-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px 28px 22px;
  box-shadow: 0 18px 40px -34px var(--shadow);
  overflow: hidden;
}
.tip-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; background: linear-gradient(var(--brass), var(--accent));
}
.tip-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 12px;
}
.tip-label {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--brass); font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.tip-label svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tip-date { color: var(--muted); font-size: 13.5px; }
.tip-text {
  font-family: var(--serif); font-size: 22px; line-height: 1.42;
  color: var(--ink); margin: 0; max-width: 34em;
  min-height: 2.84em;
}
.tip-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-soft);
  color: var(--muted); font-size: 13.5px;
}
.tip-nav { display: flex; align-items: center; gap: 4px; }
.tip-nav button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0;
  background: none; border: 1px solid var(--line); border-radius: 5px;
  color: var(--muted); cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.tip-nav button:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.tip-nav button:disabled { opacity: 0.35; cursor: default; }
.tip-nav svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tip-text.is-fading { opacity: 0; transform: translateY(6px); }
.tip-text { transition: opacity 0.22s var(--ease), transform 0.22s var(--ease); }

@media (max-width: 620px) {
  .tip-card { padding: 22px 20px 18px; }
  .tip-text { font-size: 19px; }
}

/* ---------- Photographs ---------- */

figure.photo { margin: 0; }
figure.photo img {
  width: 100%; display: block;
  border-radius: 8px; border: 1px solid var(--line);
  box-shadow: 0 22px 46px -32px var(--shadow);
}
figure.photo figcaption {
  color: var(--muted); font-size: 13.5px; line-height: 1.5;
  margin-top: 11px; max-width: 42em;
}

/* Text beside a photo */
.media-row { display: grid; grid-template-columns: 1fr 320px; gap: 46px; align-items: center; }
.media-row.flip { grid-template-columns: 320px 1fr; }
.media-row .media-text > p:last-child { margin-bottom: 0; }
@media (max-width: 820px) {
  .media-row, .media-row.flip { grid-template-columns: 1fr; gap: 30px; }
  .media-row.flip figure.photo { order: 2; }
  .media-row.flip .media-text { order: 1; }
  figure.photo img { max-height: 460px; object-fit: cover; object-position: center 22%; }
}

/* Wide photo used as a band between sections */
.photo-band { padding: 0; border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.photo-band .wrap { padding-top: 54px; padding-bottom: 54px; }
.photo-band figure.photo img { max-height: 470px; object-fit: cover; object-position: center 38%; }
.photo-band .cap-row {
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  margin-top: 13px;
}
.photo-band .cap-row .c { color: var(--muted); font-size: 14px; margin: 0; max-width: 40em; }
.photo-band .cap-row .t {
  color: var(--brass); font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase; white-space: nowrap;
}

/* ---------- Stats ---------- */

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 2px; margin-top: 8px;
  border: 1px solid var(--line); border-radius: 8px;
  overflow: hidden; background: var(--line);
}
.stat { background: var(--card); padding: 22px 20px; text-align: center; }
.stat .num {
  font-family: var(--serif); font-weight: 600;
  font-size: 34px; line-height: 1; color: var(--accent);
  display: block; margin-bottom: 6px;
}
.stat .lab { color: var(--muted); font-size: 13.5px; line-height: 1.35; display: block; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Research focus rows ---------- */

.focus-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; margin-top: 6px; }
.focus {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 7px; padding: 22px 22px 20px; margin: 0 0 12px;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.focus:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 16px 32px -28px var(--shadow); }
.focus .n {
  font-family: var(--serif); color: var(--brass);
  font-size: 14px; font-weight: 600; display: block; margin-bottom: 8px;
}
.focus h3 { font-family: var(--sans); font-size: 17px; font-weight: 600; margin: 0 0 6px; line-height: 1.35; }
.focus p { font-size: 15.5px; margin: 0; color: var(--ink-soft); }
@media (max-width: 720px) { .focus-grid { grid-template-columns: 1fr; } }

.callout {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0 7px 7px 0;
  padding: 22px 24px; margin: 28px 0 0;
}
.callout .k { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 8px; }
.callout .v { font-family: var(--serif); font-size: 20px; line-height: 1.38; margin: 0; }
.callout .sub { font-size: 14.5px; color: var(--muted); margin: 10px 0 0; }
.status-pill {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 14px; padding: 5px 12px;
  background: var(--accent-dim); border: 1px solid var(--line);
  border-radius: 100px; color: var(--accent);
  font-size: 13px; font-weight: 600;
}
.status-pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brass); flex: none;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---------- Post cards ---------- */

.post-list { display: grid; gap: 14px; margin-top: 26px; }
.post-card {
  display: block; background: var(--card);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 24px 26px;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.post-card:hover {
  border-color: var(--accent); transform: translateY(-2px);
  box-shadow: 0 18px 36px -30px var(--shadow); text-decoration: none;
}
.post-meta {
  display: flex; align-items: center; gap: 10px;
  color: var(--brass); font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.05em; margin: 0 0 9px;
}
.post-meta .sep { color: var(--line); }
.post-meta .read { color: var(--muted); font-weight: 500; letter-spacing: 0; }
.post-card-h3 {
  display: block;
  font-family: var(--serif); font-size: 22px; font-weight: 600;
  line-height: 1.26; margin: 0 0 9px; color: var(--ink);
}
.post-card-sum { display: block; font-size: 15.5px; color: var(--muted); margin: 0; max-width: 46em; }
.post-card .go { display: inline-block; margin-top: 14px; color: var(--accent); font-size: 14.5px; font-weight: 500; }
.post-card .go::after { content: " \2192"; transition: margin-left 0.2s var(--ease); }
.post-card:hover .go::after { margin-left: 4px; }

/* Cards with a header thumbnail: image left, text right; stacks on mobile. */
.post-card.has-thumb { display: grid; grid-template-columns: 210px 1fr; gap: 0; padding: 0; overflow: hidden; }
.post-card.has-thumb .post-thumb { display: block; background: var(--bg-alt); }
.post-card.has-thumb .post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card.has-thumb .post-body-col { display: block; padding: 22px 26px; }
.post-card .post-body-col { display: block; }
@media (max-width: 640px) {
  .post-card.has-thumb { grid-template-columns: 1fr; }
  .post-card.has-thumb .post-thumb img { height: 160px; }
}
.empty { color: var(--muted); font-size: 15.5px; }

/* ---------- Publications ---------- */

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 26px; }
.chip {
  padding: 7px 15px; border-radius: 100px;
  border: 1px solid var(--line); background: var(--card);
  color: var(--muted); font-size: 14px; font-weight: 500;
  cursor: pointer; font-family: var(--sans);
  transition: all 0.2s var(--ease);
}
.chip:hover { color: var(--ink); border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); }

ol.pubs { list-style: none; counter-reset: p; padding: 0; margin: 0; }
ol.pubs li {
  counter-increment: p; position: relative;
  padding: 20px 0 20px 42px; border-top: 1px solid var(--line);
  font-size: 16px; line-height: 1.58;
}
ol.pubs li:first-child { border-top: none; }
ol.pubs li::before {
  content: counter(p, decimal-leading-zero);
  position: absolute; left: 0; top: 21px;
  font-family: var(--serif); font-size: 14px;
  color: var(--brass); font-weight: 600;
}
ol.pubs li.is-hidden { display: none; }
.pubs .venue { font-style: italic; }
.pubs .doi { font-size: 14px; word-break: break-word; }
.pub-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.mini-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 4px;
  border: 1px solid var(--line); background: none;
  color: var(--muted); font-size: 13px; font-family: var(--sans);
  cursor: pointer; transition: all 0.2s var(--ease);
}
.mini-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); text-decoration: none; }
.mini-btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mini-btn.copied { color: var(--accent); border-color: var(--accent); }

ul.review { list-style: none; padding: 0; margin: 0; }
ul.review li { padding: 16px 0; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.5; }
ul.review li:first-child { border-top: none; }
ul.review .venue { color: var(--muted); font-size: 14.5px; display: block; margin-top: 4px; }

/* ---------- Rows, lists ---------- */

.row { padding: 18px 0; border-top: 1px solid var(--line); }
.row:first-of-type { border-top: none; }
.row h3 { font-family: var(--sans); font-size: 17px; font-weight: 600; margin: 0 0 4px; }
.row .meta { color: var(--muted); font-size: 14.5px; margin: 0 0 7px; }
.row p { font-size: 16px; margin: 0; color: var(--ink-soft); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 44px; }
@media (max-width: 640px) { .two-col { grid-template-columns: 1fr; } }

ul.creds { list-style: none; padding: 0; margin: 0; }
ul.creds li { padding: 15px 0; border-top: 1px solid var(--line); }
ul.creds li:first-child { border-top: none; }
ul.creds .name { font-weight: 600; }
ul.creds .body { color: var(--muted); font-size: 15px; }

/* ---------- Contact ---------- */

.contact-grid { display: flex; flex-wrap: wrap; gap: 20px 46px; margin-top: 8px; }
.contact-grid .label { display: block; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 3px; }
.contact-grid a, .contact-grid span.val { font-size: 16.5px; }

.form-wrap {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 8px; padding: 30px 30px 32px;
  box-shadow: 0 18px 44px -38px var(--shadow);
}
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14.5px; font-weight: 600; margin-bottom: 7px; color: var(--ink-soft); }
.field .req { color: var(--brass); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); border-radius: 5px;
  font-family: var(--sans); font-size: 16px; line-height: 1.5;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field textarea { min-height: 158px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 620px) { .field-row { grid-template-columns: 1fr; } .form-wrap { padding: 24px 20px 26px; } }
.hp { position: absolute; left: -9999px; }
.form-note { color: var(--muted); font-size: 13.5px; margin: 14px 0 0; }
.form-status { margin-top: 16px; padding: 14px 16px; border-radius: 6px; font-size: 15px; display: none; }
.form-status.ok { display: block; background: var(--accent-dim); border: 1px solid var(--accent); color: var(--accent); }
.form-status.err { display: block; background: rgba(180, 60, 40, 0.08); border: 1px solid rgba(180, 60, 40, 0.4); color: #B43C28; }
:root[data-theme="dark"] .form-status.err { color: #E88C78; }
.btn[disabled] { opacity: 0.6; cursor: wait; transform: none; }

/* ---------- Post body ---------- */

.post-wrap { max-width: 720px; margin: 0 auto; padding: 0 28px; }
.post-header { padding: 56px 0 32px; }
.post-header .post-meta { margin-bottom: 14px; }
.post-header h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(32px, 6vw, 48px);
  line-height: 1.08; letter-spacing: -0.018em; margin: 0 0 18px;
}
.post-header .summary { font-size: 19px; color: var(--muted); line-height: 1.5; margin: 0; }
.post-body { font-size: 18.5px; line-height: 1.72; padding-bottom: 20px; }
.post-body p { max-width: none; margin: 0 0 24px; }
.post-body > p:first-of-type::first-letter {
  font-family: var(--serif); font-size: 3.4em;
  float: left; line-height: 0.86; padding: 0.06em 0.09em 0 0;
  color: var(--accent); font-weight: 600;
}
.post-body h2 { font-size: 27px; margin: 40px 0 16px; }
.post-body h3 { font-family: var(--serif); font-size: 21px; margin: 30px 0 12px; }
.post-body ul, .post-body ol { padding-left: 24px; margin: 0 0 24px; }
.post-body li { margin-bottom: 10px; }
.post-body blockquote {
  border-left: 3px solid var(--brass); margin: 28px 0;
  padding: 6px 0 6px 22px; color: var(--ink-soft);
  font-family: var(--serif); font-size: 21px; line-height: 1.5;
}
.post-body a { text-decoration: underline; text-underline-offset: 3px; }
.post-body img { border-radius: 8px; display: block; }
.post-body figure { margin: 32px 0; }
.post-body figure img { border: 1px solid var(--line); }
.post-body figcaption { color: var(--muted); font-size: 14.5px; margin-top: 10px; text-align: center; }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }

.post-foot {
  margin-top: 40px; padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.back-link { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 500; }
.back-link::before { content: "\2190"; }

.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 30px; }
.prevnext a {
  display: block; padding: 18px 20px;
  border: 1px solid var(--line); border-radius: 7px;
  background: var(--card);
  transition: border-color 0.2s var(--ease);
}
.prevnext a:hover { border-color: var(--accent); text-decoration: none; }
.prevnext .dir { display: block; color: var(--muted); font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px; }
.prevnext .ttl { font-family: var(--serif); font-size: 17px; color: var(--ink); line-height: 1.3; }
.prevnext .next { text-align: right; }
@media (max-width: 620px) { .prevnext { grid-template-columns: 1fr; } .prevnext .next { text-align: left; } }

/* ---------- Full tips index ---------- */

.tip-jump { margin-bottom: 0; }
.tip-jump a.chip { text-decoration: none; }
.tip-jump a.chip:hover { text-decoration: none; color: var(--ink); border-color: var(--accent); }

.tip-sections > section {
  padding: 46px 0;
  border-bottom: 1px solid var(--line);
}
.tip-sections > section:last-child { border-bottom: none; }
.tip-sections h2 { font-size: 26px; }

ol.tip-index { list-style: none; padding: 0; margin: 22px 0 0; }
ol.tip-index li {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr 22px;
  gap: 0 6px;
  align-items: start;
  padding: 14px 8px 14px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 16.5px; line-height: 1.55;
  border-radius: 5px;
  scroll-margin-top: 90px;
}
ol.tip-index li:first-child { border-top: none; }
ol.tip-index .n {
  font-family: var(--serif); font-size: 14px; font-weight: 600;
  color: var(--brass); text-align: right; padding-top: 4px; padding-right: 12px;
}
ol.tip-index .permalink {
  opacity: 0; color: var(--muted); font-size: 14px;
  text-align: center; padding-top: 3px;
  transition: opacity 0.2s var(--ease);
}
ol.tip-index li:hover .permalink { opacity: 1; }
ol.tip-index .permalink:hover { color: var(--accent); text-decoration: none; }
ol.tip-index li:target {
  background: var(--accent-dim);
  box-shadow: inset 3px 0 0 var(--brass);
  padding-left: 0;
}
ol.tip-index li:target .permalink { opacity: 1; }
@media (max-width: 620px) {
  ol.tip-index li { grid-template-columns: 32px 1fr; padding-right: 0; }
  ol.tip-index .n { padding-right: 8px; }
  ol.tip-index .permalink { display: none; }
}

.tip-more { font-size: 13.5px; }

/* ---------- Tip archive ---------- */

.tip-archive { list-style: none; padding: 0; margin: 24px 0 0; }
.tip-archive li {
  display: grid; grid-template-columns: 118px 1fr;
  gap: 18px; padding: 15px 0;
  border-top: 1px solid var(--line);
  font-size: 16px; line-height: 1.5;
}
.tip-archive li:first-child { border-top: none; }
.tip-archive .d { color: var(--brass); font-size: 13px; font-weight: 600; padding-top: 3px; }
@media (max-width: 620px) {
  .tip-archive li { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 44px 0 56px;
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--muted); font-size: 14.5px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px; margin-bottom: 34px;
}
.footer-grid h4 {
  font-family: var(--sans); font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 14px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 9px; }
.footer-grid a { color: var(--muted); }
.footer-grid a:hover { color: var(--accent); }
.footer-brand { font-family: var(--serif); font-size: 19px; color: var(--ink); margin: 0 0 10px; }
.footer-tag { max-width: 26em; margin: 0; }
.footer-bar {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding-top: 22px; border-top: 1px solid var(--line); font-size: 13.5px;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 26px; } }

/* ---------- Back to top ---------- */

.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 44px; height: 44px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--bg);
  border: 0; border-radius: 50%; cursor: pointer;
  box-shadow: 0 12px 28px -12px var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent-2); }
.to-top svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 620px) { .to-top { right: 14px; bottom: 14px; width: 40px; height: 40px; } }

/* ---------- 404 ---------- */

.center-page { padding: 100px 0 120px; text-align: center; }
.center-page h1 { font-family: var(--serif); font-size: clamp(40px, 9vw, 72px); margin: 0 0 14px; line-height: 1; }
.center-page p { margin-left: auto; margin-right: auto; }
.center-page .cta-row { justify-content: center; }

/* ---------- Print ---------- */

@media print {
  .site-header, .mobile-nav, .to-top, .site-footer, .cta-row, .tip-nav { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  body::before { display: none; }
  a { color: #000; text-decoration: none; }
  section { padding: 14pt 0; border-bottom: 1px solid #ccc; break-inside: avoid; }
}
