@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,700;1,9..40,400&display=swap');

:root {
  --bg: #f5f0e8;
  --surface: #ffffff;
  --text: #2d2a26;
  --muted: #8a8377;
  --accent: #e8a430;
  --accent-light: #fdf4e3;
  --border: #e8e2d6;
  --cta: #3a3632;
  --cta-hover: #2d2a26;
  --yes: #5a9e6f;
  --no: #c75c4a;
  --radius: 20px;
  --radius-pill: 100px;
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-logo: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --grad-warm: linear-gradient(135deg, #f8e8f0 0%, #fce8d4 40%, #fdf4e3 100%);
  --grad-card: linear-gradient(145deg, rgba(248,232,240,0.4) 0%, rgba(252,232,212,0.3) 50%, rgba(253,244,227,0.5) 100%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.site-header,
main,
.site-footer {
  width: min(720px, 90vw);
  margin: 0 auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
}

.brand {
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

nav {
  display: flex;
  gap: 1.25rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.15s;
}

nav a:hover {
  color: var(--text);
}

main {
  padding: 2rem 0 3rem;
}

article,
.page {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

a {
  color: var(--text);
  font-weight: 500;
}

a:hover {
  color: var(--accent);
}

.meta {
  color: var(--muted);
  margin-top: -0.5rem;
}

/* --- Home hero --- */

.home-hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
}

.home-hero-kicker {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.home-hero-title {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  margin: 0 0 1rem;
  line-height: 1.08;
}

.home-hero-sub {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 520px;
  margin: 0 auto 1.75rem;
  line-height: 1.6;
}

.home-hero-cta {
  margin-bottom: 0.5rem;
}

/* --- Home quick tools --- */

.home-quick {
  margin-bottom: 3rem;
}

.home-section-label {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0 0 0.5rem;
}

.home-section-sub {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 1.25rem;
  max-width: 520px;
}

.home-quick-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.home-quick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  background: var(--grad-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.home-quick-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
  color: var(--text);
}

.home-quick-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.home-quick-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.home-quick-desc {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

/* --- Home guides --- */

.home-guides {
  margin-bottom: 3rem;
}

.home-guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.home-guide-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.home-guide-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  color: var(--text);
}

.home-guide-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}

.home-guide-card p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

.home-guide-count {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.home-guides-more {
  text-align: center;
  font-size: 0.95rem;
}

.home-guides-more a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.home-guides-more a:hover {
  color: var(--text);
}

/* --- Home search --- */

.home-search-section {
  margin-bottom: 3rem;
}

.home-search-wrap {
  max-width: 560px;
}

/* --- Home reading --- */

.home-reading {
  margin-bottom: 1rem;
}

.home-reading-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.home-reading-list li {
  margin-bottom: 0.25rem;
}

.home-reading-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  text-decoration: none;
  color: var(--text);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s;
}

.home-reading-list a:hover {
  color: var(--accent);
}

.home-reading-title {
  font-weight: 500;
  font-size: 0.95rem;
}

.home-reading-date {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

/* --- Index pages (guides, tools, blog) --- */

.index-hero {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
}

.index-hero h1 {
  font-size: 2.4rem;
  margin-bottom: 0.5rem;
}

.index-hero p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto;
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.index-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.index-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  color: var(--text);
}

.index-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}

.index-card p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

.index-card p:last-child {
  margin-bottom: 0;
}

.index-card-meta {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.index-card--tool {
  background: var(--grad-card), var(--surface);
}

/* --- Card grid (homepage) --- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.card {
  display: block;
  background: var(--grad-card), var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  color: var(--text);
}

.card h2 {
  margin-top: 0;
  font-size: 1.4rem;
}

.card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* --- Buttons --- */

.btn {
  display: inline-block;
  background: var(--cta);
  color: #fff;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-pill);
  border: none;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s;
}

.btn:hover {
  background: var(--cta-hover);
  color: #fff;
  opacity: 1;
}

.btn-large {
  font-size: 1.05rem;
  padding: 0.85rem 2.25rem;
}

/* --- Tool interactive elements --- */

.tool-tagline {
  color: var(--muted);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.answer-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 200px;
  border-radius: 24px;
  margin: 1.5rem auto;
  font-size: 2.5rem;
  font-weight: 700;
  font-family: var(--font-body);
  color: #fff;
}

.answer-yes {
  background: var(--yes);
}

.answer-no {
  background: var(--no);
}

.pop-in {
  animation: popIn 0.35s ease-out;
}

@keyframes popIn {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* --- Yes/No Button tool --- */

.yesno-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2.5rem 1rem 1.5rem;
}

.yesno-orb {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-warm);
  border: 2px solid var(--border);
  transition: background 0.5s ease, border-color 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.yesno-orb-text {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 400;
  color: var(--muted);
  user-select: none;
  transition: color 0.3s ease;
}

.yesno-orb-text--revealed {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 2.5rem;
  color: #fff;
  animation: orbTextReveal 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes orbTextReveal {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.yesno-orb--thinking {
  animation: orbThink 0.9s ease-in-out;
  border-color: var(--accent);
}

@keyframes orbThink {
  0% { transform: scale(1); }
  15% { transform: scale(0.92); }
  40% { transform: scale(1.06); }
  65% { transform: scale(0.96); }
  85% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.yesno-orb--yes {
  background: var(--yes);
  border-color: var(--yes);
  transform: scale(1.05);
}

.yesno-orb--no {
  background: var(--no);
  border-color: var(--no);
  transform: scale(1.05);
}

.yesno-reveal-btn {
  display: inline-block;
  background: var(--cta);
  color: #fff;
  padding: 0.85rem 2.25rem;
  border-radius: var(--radius-pill);
  border: none;
  font-size: 1.05rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.yesno-reveal-btn:hover {
  background: var(--cta-hover);
  transform: translateY(-1px);
}

.yesno-reveal-btn:active {
  transform: translateY(0);
}

.yesno-again {
  text-align: center;
}

/* --- Coin flip tool --- */

.coin-stage {
  display: flex;
  justify-content: center;
  padding: 2rem 0 1rem;
  perspective: 800px;
}

.coin {
  width: 160px;
  height: 160px;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(0deg);
}

.coin-face {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 400;
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), inset 0 2px 0 rgba(255, 255, 255, 0.25);
}

.coin-heads {
  background: linear-gradient(145deg, #d4a54a, #c4913a);
  border: 3px solid #b8832f;
}

.coin-tails {
  background: linear-gradient(145deg, #a8a8a8, #8e8e8e);
  border: 3px solid #7a7a7a;
  transform: rotateX(180deg);
}

.coin-result {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.6rem;
  min-height: 2.2rem;
  margin-bottom: 0.5rem;
}

.coin-result--heads {
  color: #b8832f;
  animation: coinResultIn 0.3s ease-out;
}

.coin-result--tails {
  color: #7a7a7a;
  animation: coinResultIn 0.3s ease-out;
}

@keyframes coinResultIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.coin-actions {
  text-align: center;
  margin-bottom: 0.75rem;
}

.coin-flip-btn {
  display: inline-block;
  background: var(--cta);
  color: #fff;
  padding: 0.85rem 2.25rem;
  border-radius: var(--radius-pill);
  border: none;
  font-size: 1.05rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.coin-flip-btn:hover {
  background: var(--cta-hover);
  transform: translateY(-1px);
}

.coin-flip-btn:active {
  transform: translateY(0);
}

.coin-tally {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* --- Random number generator tool --- */

.rng-panel {
  max-width: 400px;
  margin: 0 auto;
  padding: 1.5rem 0;
}

.rng-range {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.rng-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.rng-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.rng-input {
  width: 100px;
  padding: 0.65rem 0.85rem;
  font-size: 1.1rem;
  font-family: var(--font-body);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 4px);
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s;
  -moz-appearance: textfield;
}

.rng-input::-webkit-inner-spin-button,
.rng-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.rng-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 164, 48, 0.2);
}

.rng-to {
  color: var(--muted);
  font-size: 0.95rem;
  padding-bottom: 0.7rem;
}

.rng-result {
  text-align: center;
  margin-bottom: 1.25rem;
}

.rng-number {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1;
  display: inline-block;
  min-width: 2ch;
}

.rng-number--landed {
  color: var(--text);
  animation: rngLand 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes rngLand {
  from { transform: scale(1.15); }
  to { transform: scale(1); }
}

.rng-actions {
  text-align: center;
  margin-bottom: 1rem;
}

.rng-generate-btn {
  display: inline-block;
  background: var(--cta);
  color: #fff;
  padding: 0.85rem 2.25rem;
  border-radius: var(--radius-pill);
  border: none;
  font-size: 1.05rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.rng-generate-btn:hover {
  background: var(--cta-hover);
  transform: translateY(-1px);
}

.rng-generate-btn:active {
  transform: translateY(0);
}

.rng-history {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.rng-history-label {
  font-weight: 600;
}

#button-area,
#ask-again-area,
#oracle-again-area {
  text-align: center;
}

/* --- Oracle form --- */

#oracle-form {
  max-width: 440px;
  margin: 0 auto 1.5rem;
  text-align: center;
}

#oracle-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

#oracle-form input[type="text"] {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-family: var(--font-body);
  background: var(--surface);
  transition: border-color 0.15s;
}

#oracle-form input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
}

/* --- Random choice picker tool (matches decision-maker warmth + glass) --- */

.random-choice-panel {
  background: var(--grad-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem 1.5rem;
  max-width: 520px;
  margin: 0 auto 1.25rem;
}

#random-choice-form {
  margin: 0;
}

.random-choice-rows {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.random-choice-row {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius);
  padding: 0.9rem 1rem 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.random-choice-row:focus-within {
  border-color: rgba(232, 164, 48, 0.45);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.random-choice-label {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.random-choice-row-inner {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.random-choice-input {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.85rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 4px);
  font-family: var(--font-body);
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.random-choice-input::placeholder {
  color: var(--muted);
  opacity: 0.85;
}

.random-choice-input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(232, 164, 48, 0.2);
}

.random-choice-remove {
  flex-shrink: 0;
  margin: 0;
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s, background 0.15s;
}

.random-choice-remove:hover {
  color: var(--no);
  background: rgba(199, 92, 74, 0.08);
  text-decoration: none;
}

.random-choice-remove[hidden] {
  display: none;
}

.random-choice-actions,
.random-choice-submit-wrap,
.random-choice-again-wrap {
  text-align: center;
  margin: 1rem 0 0;
}

.random-choice-actions {
  margin-top: 1.1rem;
}

.random-choice-submit-wrap {
  margin-top: 1.35rem;
  margin-bottom: 0;
}

.random-choice-add-btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.35);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.random-choice-add-btn:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.random-choice-error {
  color: var(--no);
  text-align: center;
  font-weight: 500;
  font-size: 0.95rem;
  max-width: 520px;
  margin: 0 auto 1rem;
  padding: 0.65rem 1rem;
  background: rgba(199, 92, 74, 0.08);
  border-radius: var(--radius);
  border: 1px solid rgba(199, 92, 74, 0.25);
}

.random-choice-result-wrap {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}

.random-choice-outcome-card {
  margin: 0 auto;
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 2px solid var(--accent);
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.06);
  text-align: center;
}

.random-choice-result-kicker {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.random-choice-result-text {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.35rem, 4vw, 2rem);
  font-weight: 400;
  font-family: var(--font-display);
  line-height: 1.25;
  letter-spacing: -0.02em;
  word-wrap: break-word;
}

.random-choice-panel--picking {
  opacity: 0.92;
  pointer-events: none;
}

.random-choice-input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.random-choice-remove:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.random-choice-add-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#random-choice-submit:disabled,
#random-choice-again:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.random-choice-brewing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 6.5rem;
  margin: 0;
  padding: 0.25rem 0 0.15rem;
  text-align: center;
  animation: rcBrewIn 0.4s ease-out;
}

@keyframes rcBrewIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.random-choice-brewing-text {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  font-style: italic;
  color: var(--text);
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.random-choice-brewing-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
}

.random-choice-brewing-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  animation: rcBrewDot 0.55s ease-in-out infinite;
}

.random-choice-brewing-dots span:nth-child(2) {
  animation-delay: 0.1s;
}

.random-choice-brewing-dots span:nth-child(3) {
  animation-delay: 0.2s;
}

@keyframes rcBrewDot {
  0%,
  70%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  35% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* --- Pagefind search overrides --- */

.pagefind-ui {
  --pagefind-ui-scale: 0.9;
  --pagefind-ui-primary: var(--cta);
  --pagefind-ui-text: var(--text);
  --pagefind-ui-background: var(--surface);
  --pagefind-ui-border: var(--border);
  --pagefind-ui-border-width: 1px;
  --pagefind-ui-border-radius: var(--radius);
  --pagefind-ui-font: var(--font-body);
}

.pagefind-ui .pagefind-ui__search-input {
  font-family: var(--font-body);
}

.pagefind-ui .pagefind-ui__result-link {
  color: var(--text);
}

.pagefind-ui .pagefind-ui__result-link:hover {
  color: var(--accent);
}

/* --- Reading list --- */

.reading-list {
  margin-top: 1rem;
}

.reading-list ul {
  list-style: none;
  padding: 0;
}

.reading-list li {
  margin-bottom: 0.5rem;
}

.reading-list small {
  color: var(--muted);
}

/* --- Footer --- */

.site-footer {
  padding: 2.5rem 0;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-columns h4 {
  margin: 0 0 0.5rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-columns ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-columns li {
  margin-bottom: 0.35rem;
}

.footer-columns a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-columns a:hover {
  color: var(--text);
}

/* --- Decision maker --- */

.decision-maker,
.tool {
  background: var(--grad-warm);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.decision-maker::before,
.tool::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0) 35%,
    rgba(255, 255, 255, 0.45) 50%,
    rgba(255, 255, 255, 0) 65%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 250% 250%;
  background-position: 100% 100%;
  animation: dtSheen 1.2s 0.3s ease-out forwards;
  pointer-events: none;
  border-radius: inherit;
}

@keyframes dtSheen {
  from {
    background-position: 100% 100%;
  }
  to {
    background-position: 0% 0%;
  }
}

.dt-title {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.dt-description {
  color: var(--muted);
  text-align: center;
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.dt-progress {
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-pill);
  height: 6px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.dt-progress-bar {
  background: var(--accent);
  height: 100%;
  width: 0%;
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}

.dt-progress-text {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0;
  margin-bottom: 2.5rem;
}

.dt-question {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 1.75rem;
  min-height: 3.5rem;
}

.dt-answers {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 480px;
  margin: 0 auto;
}

.dt-answer-btn {
  width: 100%;
  padding: 1.1rem 1.25rem;
  font-size: 1rem;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(4px);
  color: var(--text);
  border-radius: var(--radius);
  text-align: left;
  font-weight: 500;
  font-family: var(--font-body);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.dt-answer-btn:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--text);
  opacity: 1;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.dt-fade-in {
  animation: dtFadeIn 0.3s ease-out;
}

@keyframes dtFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Result */

.dt-result-box {
  text-align: center;
  padding: 2.5rem 2rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
}

.dt-result-keep {
  border: 2px solid var(--yes);
}

.dt-result-moderate {
  border: 2px solid var(--accent);
}

.dt-result-delete {
  border: 2px solid var(--no);
}

.dt-result-neutral {
  border: 2px solid var(--border);
}

.dt-result-box h2 {
  margin-top: 0;
}

.dt-result-box p {
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0.5rem auto 0;
  line-height: 1.7;
}

#dt-restart-area {
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Ad slot */

.dt-ad-slot {
  margin: 2rem auto;
  text-align: center;
  max-width: 480px;
  min-height: 100px;
}

.dt-date {
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
  margin-top: -0.25rem;
  margin-bottom: 1.25rem;
}

.dt-sources {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border, #e5e5e5);
  font-size: 0.8rem;
  color: var(--muted);
}

.dt-sources h2 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
  color: var(--muted);
}

.dt-sources ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dt-sources li {
  margin-bottom: 0.4rem;
  line-height: 1.5;
}

.dt-sources a {
  color: var(--muted);
  text-decoration: underline;
}

.dt-source-publisher {
  color: var(--muted);
}

.dt-summary {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.dt-summary p {
  margin: 0;
}

.dt-noscript ol {
  padding-left: 1.25rem;
}

.dt-noscript li {
  margin-bottom: 0.75rem;
}

.dt-noscript ul {
  margin-top: 0.25rem;
  color: var(--muted);
}

.dt-related {
  margin-top: 1.5rem;
}

.dt-related h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.dt-related ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
}

.dt-related li a {
  display: block;
  background: var(--grad-card), var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dt-related li a:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  color: var(--text);
}

.dt-related .dt-related-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  margin: 0 0 0.35rem;
  line-height: 1.2;
}

.dt-related .dt-related-blurb {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.5;
}

/* --- About page --- */

.about-team {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.about-person {
  background: var(--grad-card), var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.about-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin-bottom: 0.75rem;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.about-person h3 {
  margin: 0 0 0.15rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
}

.about-role {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.75rem;
}

.about-person p:last-child {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.65;
}

/* --- Responsive --- */

@media (max-width: 680px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  nav {
    gap: 0.75rem;
  }

  .home-quick-row {
    grid-template-columns: 1fr;
  }

  .home-quick-card {
    flex-direction: row;
    text-align: left;
    padding: 1rem;
    gap: 0.75rem;
  }

  .home-quick-icon {
    flex-shrink: 0;
  }

  .home-reading-list a {
    flex-direction: column;
    gap: 0.15rem;
  }

  .answer-box {
    width: 160px;
    height: 160px;
    font-size: 2rem;
  }

  .random-choice-panel {
    padding: 1.35rem 1.1rem 1.25rem;
  }

  .random-choice-row-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .random-choice-remove {
    align-self: flex-end;
    padding: 0.25rem 0;
  }

  .dt-question {
    font-size: 1.4rem;
    min-height: auto;
  }

  article,
  .page {
    padding: 1.25rem;
  }
}
