/* ===========================================================
   Decidely — shared design system
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root{
  --ink: #14162B;
  --ink-soft: #4A4C63;
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --surface-sunken: #F1F0EC;
  --border: #E4E2DA;
  --brand: #5B4CFF;
  --brand-dark: #4636E0;
  --brand-tint: #EEECFF;
  --accent: #C6F135;
  --accent-dark: #A9CE1E;
  --danger: #E24957;
  --focus: #14162B;
  --shadow-sm: 0 1px 2px rgba(20,22,43,0.06), 0 1px 1px rgba(20,22,43,0.04);
  --shadow-md: 0 8px 24px rgba(20,22,43,0.08);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --maxw: 1080px;
}

[data-theme="dark"]{
  --ink: #F5F4F8;
  --ink-soft: #B3B2C6;
  --bg: #101124;
  --surface: #181A34;
  --surface-sunken: #20223F;
  --border: #2E3055;
  --brand: #8A7CFF;
  --brand-dark: #7466F0;
  --brand-tint: #23234A;
  --accent: #D8FF5C;
  --accent-dark: #B9E63E;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 28px rgba(0,0,0,0.4);
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

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

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}

h1, h2, h3, h4{
  font-family: 'Sora', sans-serif;
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1{ font-size: clamp(32px, 6vw, 52px); font-weight: 700; letter-spacing: -0.5px; }
h2{ font-size: clamp(24px, 4vw, 32px); font-weight: 700; letter-spacing: -0.3px; }
h3{ font-size: 19px; font-weight: 600; }

p{ margin: 0 0 1em; color: var(--ink-soft); }

a{ color: var(--brand); text-decoration: none; }
a:hover{ text-decoration: underline; }

img, svg{ max-width: 100%; display: block; }

button, input{ font-family: inherit; font-size: inherit; color: inherit; }

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

.container{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.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;
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 13px 24px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease;
  min-height: 44px;
  white-space: nowrap;
}
.btn:active{ transform: scale(0.97); }

.btn-primary{
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover{ background: var(--brand-dark); color: #fff; }

.btn-accent{
  background: var(--accent);
  color: var(--ink);
}
.btn-accent:hover{ background: var(--accent-dark); }

.btn-ghost{
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover{ border-color: var(--ink); }

.btn-text{
  background: transparent;
  color: var(--brand);
  padding: 8px 10px;
}

.btn-sm{ padding: 9px 16px; font-size: 13.5px; min-height: 36px; }
.btn-icon{ padding: 10px; min-width: 44px; }
.btn:disabled{ opacity: 0.45; cursor: not-allowed; }

.btn-block{ width: 100%; }

/* ---------- Nav ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250,250,247,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .site-header{ background: rgba(16,17,36,0.86); }

.site-header .container{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo{
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 21px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo:hover{ text-decoration: none; }
.logo .dot{ color: var(--brand); }

.main-nav{
  display: flex;
  align-items: center;
  gap: 28px;
}
.main-nav a{
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 14.5px;
}
.main-nav a:hover{ color: var(--ink); text-decoration: none; }
.main-nav a.current{ color: var(--ink); font-weight: 600; }

.nav-actions{ display: flex; align-items: center; gap: 10px; }

.theme-toggle{
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 16px;
}

.nav-links-desktop{ display: flex; }
.hamburger{ display: none; }

.mobile-menu{
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px 20px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.mobile-menu.open{ display: flex; }
.mobile-menu a{
  padding: 12px 4px;
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child{ border-bottom: none; }

@media (max-width: 780px){
  .nav-links-desktop{ display: none; }
  .hamburger{
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    background: transparent; border: 1px solid var(--border); border-radius: 10px;
    cursor: pointer; font-size: 18px;
  }
  .cta-desktop-only{ display: none; }
}

/* ---------- Hero ---------- */
.hero{
  padding: 56px 0 40px;
}
.hero .container{
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
}
@media (min-width: 900px){
  .hero .container{ grid-template-columns: 1fr 1fr; gap: 48px; }
}

.eyebrow-pill{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-tint);
  color: var(--brand-dark);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}
[data-theme="dark"] .eyebrow-pill{ color: var(--brand); }

.hero h1{ margin-bottom: 14px; }
.hero .lede{
  font-size: 18px;
  max-width: 46ch;
  margin-bottom: 26px;
}
.hero-actions{ display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Decision tool card ---------- */
.tool-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-md);
}

.tool-card .tool-label{
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.option-list{
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-row{
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 4px 4px 14px;
}
.option-row input[type="text"]{
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 4px;
  color: var(--ink);
  min-width: 0;
  text-overflow: ellipsis;
}
.option-row input[type="text"]:focus{ outline: none; }
.option-row.winning{
  border-color: var(--accent-dark);
  background: color-mix(in srgb, var(--accent) 22%, var(--surface-sunken));
}

.opt-btn{
  background: transparent;
  border: none;
  color: var(--ink-soft);
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.opt-btn:hover{ background: var(--border); color: var(--ink); }
.opt-btn.remove:hover{ background: var(--danger); color: #fff; }

.toolbar{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.tool-note{
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: -8px 0 14px;
}

.decide-btn{
  width: 100%;
  background: var(--ink);
  color: var(--bg);
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.3px;
  padding: 17px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.08s ease;
}
.decide-btn:hover{ background: var(--brand-dark); color: #fff; }
.decide-btn:active{ transform: scale(0.985); }
.decide-btn:disabled{ opacity: 0.4; cursor: not-allowed; }

/* ---------- Result ---------- */
.result-panel{
  text-align: center;
  padding: 10px 4px 4px;
}
.result-kicker{
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.4px;
  color: var(--brand-dark);
  margin-bottom: 10px;
}
[data-theme="dark"] .result-kicker{ color: var(--brand); }

.result-value{
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 6vw, 38px);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--ink);
  display: inline-block;
  margin-bottom: 14px;
  word-break: break-word;
  max-width: 100%;
}

.result-copy{
  color: var(--ink-soft);
  margin-bottom: 22px;
}

.result-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* ---------- Category grid ---------- */
.section{ padding: 52px 0; }
.section-head{ margin-bottom: 28px; text-align: center; }
.section-head p{ max-width: 56ch; margin: 0 auto; }

.cat-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 640px){ .cat-grid{ grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px){ .cat-grid{ grid-template-columns: repeat(4, 1fr); } }

.cat-card{
  position: relative;
  display: block;
  background: var(--tint, var(--surface-sunken));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.cat-card:hover{ transform: translateY(-3px); box-shadow: var(--shadow-md); text-decoration: none; }
.cat-card .emoji{ font-size: 28px; display: block; margin-bottom: 12px; }
.cat-card .name{ font-weight: 600; color: var(--ink); font-size: 15px; }
.cat-card .fav-btn{
  position: absolute; top: 10px; right: 10px;
  background: transparent; border: none; cursor: pointer;
  font-size: 16px; color: var(--ink-soft); padding: 4px;
}
.cat-card .fav-btn.active{ color: var(--accent-dark); }

/* ---------- Content sections (SEO copy) ---------- */
.prose{ max-width: 68ch; margin: 0 auto; }
.prose h2{ margin-top: 0; }

.faq-item{
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.faq-item h3{ margin-bottom: 8px; }
.faq-item p{ margin: 0; }

/* ---------- History / favorites panel ---------- */
.history-panel{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}
.history-panel h3{ margin-bottom: 12px; display:flex; align-items:center; justify-content:space-between; }
.history-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:6px; }
.history-list li{
  display:flex; align-items:center; justify-content:space-between;
  gap: 8px; padding: 9px 10px; border-radius: 10px; background: var(--surface-sunken);
  font-size: 14px;
}
.history-list .h-actions{ display:flex; gap:4px; flex-shrink:0; }
.history-empty{ color: var(--ink-soft); font-size: 14px; }

/* ---------- This or That ---------- */
.versus-wrap{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: stretch;
}
@media (max-width: 560px){
  .versus-wrap{ grid-template-columns: 1fr; }
  .versus-vs{ margin: 0 auto; }
}
.versus-card{
  background: var(--surface-sunken);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.12s ease, transform 0.1s ease;
}
.versus-card:hover{ border-color: var(--brand); }
.versus-card input[type="text"]{
  width: 100%;
  border: none;
  background: transparent;
  text-align: center;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
}
.versus-card input[type="text"]:focus{ outline: none; }
.versus-card.winner{ border-color: var(--accent-dark); background: color-mix(in srgb, var(--accent) 22%, var(--surface-sunken)); }
.versus-vs{
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif; font-weight: 800; color: var(--ink-soft);
  font-size: 14px;
}

/* ---------- Yes/No ---------- */
.yesno-wrap{ text-align: center; }
.yesno-question{
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 22px;
}
.yesno-buttons{ display: flex; gap: 14px; justify-content: center; margin-bottom: 20px; }
.yesno-btn{
  flex: 1; max-width: 200px;
  padding: 22px 0;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  background: var(--surface);
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  transition: transform 0.08s ease, border-color .12s ease;
}
.yesno-btn:hover{ border-color: var(--ink); }
.yesno-btn:active{ transform: scale(0.97); }

/* ---------- Textarea list input (name picker / teams) ---------- */
.list-input{
  width: 100%;
  min-height: 160px;
  border: 1px solid var(--border);
  background: var(--surface-sunken);
  border-radius: var(--radius-sm);
  padding: 14px;
  color: var(--ink);
  resize: vertical;
  line-height: 1.6;
}
.list-input:focus{ outline: none; border-color: var(--brand); }

.field-row{ display:flex; gap: 12px; align-items:center; flex-wrap: wrap; margin: 14px 0; }
.field-row label{ font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.field-row input[type="number"]{
  width: 74px; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink);
}

.pill-toggle{ display:flex; gap:8px; }
.pill-toggle button{
  border: 1.5px solid var(--border); background: var(--surface);
  padding: 8px 14px; border-radius: 999px; cursor: pointer; font-size: 13.5px; font-weight: 600;
  color: var(--ink-soft);
}
.pill-toggle button.active{ border-color: var(--ink); color: var(--ink); background: var(--surface-sunken); }

.winner-banner{
  text-align:center; padding: 20px; background: var(--accent); color: var(--ink);
  border-radius: var(--radius-md); font-family:'Sora',sans-serif; font-weight: 800; font-size: 20px;
  margin: 16px 0;
}

.team-grid{ display:grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); margin: 16px 0; }
.team-box{ background: var(--surface-sunken); border:1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; }
.team-box h4{ margin: 0 0 8px; font-size: 14px; color: var(--ink-soft); }
.team-box ul{ margin:0; padding-left: 18px; }

/* ---------- Preset chips ---------- */
.preset-row{ display:flex; flex-wrap:wrap; gap: 8px; margin-bottom: 16px; }
.preset-chip{
  border: 1.5px solid var(--border); background: var(--surface);
  padding: 8px 14px; border-radius: 999px; cursor: pointer; font-size: 13.5px; font-weight: 600;
}
.preset-chip.active{ background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer{
  border-top: 1px solid var(--border);
  padding: 44px 0 30px;
  margin-top: 40px;
}
.footer-grid{
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; margin-bottom: 26px;
}
.footer-brand .logo{ margin-bottom: 8px; }
.footer-brand p{ max-width: 32ch; font-size: 14px; }
.footer-links{ display:flex; gap: 60px; flex-wrap: wrap; }
.footer-links h4{ font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; }
.footer-links ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.footer-links a{ color: var(--ink); font-size: 14px; }
.footer-bottom{
  border-top: 1px solid var(--border); padding-top: 20px;
  font-size: 13px; color: var(--ink-soft);
}

/* ---------- Utility ---------- */
.stack-sm > * + *{ margin-top: 10px; }
.center{ text-align: center; }
.mt-lg{ margin-top: 40px; }
