/* The Psychology of Sustainability: shared stylesheet */
:root {
  --ink: #1d2733;
  --ink-soft: #4a5663;
  --muted: #6b7682;
  --paper: #f8f6f1;
  --card: #ffffff;
  --line: #e2ddd3;
  --green: #1f5a44;
  --green-dark: #163f30;
  --green-tint: #e7f0eb;
  --amber: #a8641b;
  --amber-tint: #fbf1e3;
  --blue: #2b5c8a;
  --blue-tint: #e8f0f8;
  --plum: #6b3f6e;
  --plum-tint: #f3ebf3;
  --radius: 10px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); margin: 0 0 .6rem; letter-spacing: -.01em; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); margin: 2.4rem 0 .8rem; }
h3 { font-size: 1.2rem; margin: 1.4rem 0 .4rem; }
p { margin: 0 0 1rem; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-dark); }
small, .small { font-size: .875rem; color: var(--muted); }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 760px; }

/* Header */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-text { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; line-height: 1.15; }
.brand-text span { display: block; font-family: var(--sans); font-weight: 500; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink-soft); font-size: .95rem; padding: .45rem .75rem; border-radius: 6px; }
.nav a:hover { background: var(--green-tint); color: var(--green-dark); }
.nav a[aria-current="page"] { color: var(--green-dark); background: var(--green-tint); font-weight: 600; }

/* Hero */
.hero { padding: 4.5rem 0 3.5rem; border-bottom: 1px solid var(--line); background:
  linear-gradient(180deg, #fff 0%, var(--paper) 100%); }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--green); margin-bottom: .9rem; }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 680px; }
.research-q { font-family: var(--serif); font-size: 1.25rem; font-style: italic; border-left: 4px solid var(--green); padding: .4rem 0 .4rem 1.1rem; margin: 1.6rem 0; max-width: 720px; color: var(--ink); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: inherit; font-weight: 600; font-size: 1rem; padding: .8rem 1.4rem; border-radius: 8px; border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-secondary { background: transparent; color: var(--green); border-color: var(--green); }
.btn-secondary:hover { background: var(--green-tint); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* Sections and cards */
section.block { padding: 3rem 0; }
section.block + section.block { border-top: 1px solid var(--line); }
.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.step-num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--green-tint); color: var(--green-dark); font-weight: 700; font-size: .9rem; margin-bottom: .6rem; }

.tag { display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: .2rem .55rem; border-radius: 4px; }
.tag-financial { background: var(--amber-tint); color: var(--amber); }
.tag-information { background: var(--blue-tint); color: var(--blue); }
.tag-social { background: var(--plum-tint); color: var(--plum); }
.tag-neutral { background: var(--green-tint); color: var(--green-dark); }

.notice { background: var(--amber-tint); border: 1px solid #ecd3ae; border-radius: var(--radius); padding: 1rem 1.2rem; font-size: .95rem; }
.notice strong { color: var(--amber); }

/* Simulator */
.sim-shell { padding: 2.5rem 0 4rem; }
.progress { margin-bottom: 1.6rem; }
.progress-label { display: flex; justify-content: space-between; font-size: .875rem; color: var(--muted); margin-bottom: .4rem; }
.progress-track { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--green); width: 0; transition: width .35s ease; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: clamp(1.4rem, 3.5vw, 2.4rem); box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 8px 24px rgba(29,39,51,.05); }
.panel h2 { margin-top: 0; }
.circumstance { display: flex; gap: .9rem; align-items: flex-start; background: var(--green-tint); border-radius: var(--radius); padding: 1rem 1.1rem; margin: 1rem 0 1.4rem; }
.circumstance svg { flex: none; margin-top: 2px; }
.circumstance p { margin: 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem; margin: 1rem 0 1.4rem; }
.fact { border: 1px solid var(--line); border-radius: 8px; padding: .8rem 1rem; }
.fact b { display: block; font-size: 1.25rem; font-family: var(--serif); }
.fact span { font-size: .85rem; color: var(--muted); }

fieldset { border: 0; padding: 0; margin: 0 0 1.4rem; }
legend { font-weight: 600; font-size: 1.05rem; margin-bottom: .7rem; padding: 0; }
.choice { display: flex; align-items: flex-start; gap: .75rem; border: 2px solid var(--line); border-radius: 9px; padding: .85rem 1rem; margin-bottom: .6rem; cursor: pointer; background: #fff; transition: border-color .15s, background .15s; }
.choice:hover { border-color: #b9c9c0; }
.choice input { margin-top: .3rem; accent-color: var(--green); width: 18px; height: 18px; flex: none; }
.choice:has(input:checked) { border-color: var(--green); background: var(--green-tint); }
.choice-text b { display: block; }
.choice-text span { font-size: .9rem; color: var(--muted); }

.likert { margin-bottom: 1.3rem; }
.likert-q { font-weight: 500; margin-bottom: .5rem; }
.likert-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; }
.likert-scale label { display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center; font-size: .78rem; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; padding: .55rem .25rem; cursor: pointer; background: #fff; }
.likert-scale label:has(input:checked) { border-color: var(--green); background: var(--green-tint); color: var(--green-dark); font-weight: 600; }
.likert-scale input { accent-color: var(--green); width: 18px; height: 18px; }

.intervention { border-radius: 12px; padding: 1.3rem 1.4rem; margin: 1rem 0 1.6rem; border: 1px solid; }
.intervention.financial { background: var(--amber-tint); border-color: #ecd3ae; }
.intervention.information { background: var(--blue-tint); border-color: #c8d9ea; }
.intervention.social { background: var(--plum-tint); border-color: #e0cde1; }
.intervention h3 { margin-top: .5rem; }
.intervention .source { font-size: .82rem; color: var(--ink-soft); margin-top: .8rem; margin-bottom: 0; }
.compare { width: 100%; border-collapse: collapse; margin: .6rem 0; font-size: .95rem; background: rgba(255,255,255,.6); border-radius: 8px; overflow: hidden; }
.compare th, .compare td { padding: .55rem .75rem; text-align: left; border-bottom: 1px solid rgba(0,0,0,.07); }
.compare th { font-weight: 600; }

.consent-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; background: #fcfbf8; margin: 1.2rem 0; font-size: .95rem; }
.consent-box ul { margin: .4rem 0 .8rem; padding-left: 1.2rem; }
.check { display: flex; gap: .65rem; align-items: flex-start; cursor: pointer; font-weight: 500; }
.check input { width: 18px; height: 18px; margin-top: .25rem; accent-color: var(--green); flex: none; }
.error-msg { color: #a33a2a; font-size: .9rem; margin-top: .4rem; min-height: 1.2em; }

/* Results */
.result-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1.4rem 1.5rem; margin-bottom: 1.25rem; }
.result-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.result-head h3 { margin: 0; }
.before-after { display: grid; grid-template-columns: 1fr auto 1fr; gap: .75rem; align-items: center; margin: 1rem 0; }
.ba-box { border: 1px solid var(--line); border-radius: 8px; padding: .75rem .9rem; background: #fcfbf8; }
.ba-box small { display: block; text-transform: uppercase; letter-spacing: .06em; font-size: .7rem; font-weight: 600; }
.ba-arrow { color: var(--muted); font-size: 1.4rem; }
.changed { color: var(--green); font-weight: 600; }
.unchanged { color: var(--muted); font-weight: 600; }
.principle { border-left: 3px solid var(--green); padding-left: 1rem; margin-top: 1rem; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin: 1.4rem 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.2rem; }
.stat b { display: block; font-family: var(--serif); font-size: 2rem; line-height: 1.1; color: var(--green-dark); }
.stat span { font-size: .85rem; color: var(--muted); }
.bar-list { list-style: none; padding: 0; margin: .5rem 0 1.5rem; }
.bar-list li { display: grid; grid-template-columns: 150px 1fr 60px; gap: .75rem; align-items: center; margin-bottom: .55rem; font-size: .92rem; }
.bar-track { display: block; height: 14px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 4px; }
.bar-fill.financial { background: var(--amber); }
.bar-fill.information { background: var(--blue); }
.bar-fill.social { background: var(--plum); }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* Research */
.refs { padding-left: 0; list-style: none; }
.refs li { padding-left: 2rem; text-indent: -2rem; margin-bottom: .8rem; font-size: .96rem; }
table.data { width: 100%; border-collapse: collapse; font-size: .93rem; background: var(--card); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin: 1rem 0 1.5rem; }
table.data th, table.data td { padding: .65rem .85rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.data th { background: #f1eee7; font-weight: 600; }
.table-scroll { overflow-x: auto; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--card); padding: 2rem 0; margin-top: 3rem; font-size: .9rem; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.site-footer p { margin: 0; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: 3rem 0 2.5rem; }
  .site-header { position: static; }
  .nav { width: 100%; }
  .nav a { padding: .4rem .55rem; font-size: .9rem; }
  .likert-scale { grid-template-columns: repeat(5, 1fr); gap: .25rem; }
  .likert-scale label { font-size: .68rem; padding: .45rem .1rem; }
  .before-after { grid-template-columns: 1fr; }
  .ba-arrow { transform: rotate(90deg); justify-self: center; }
  .bar-list li { grid-template-columns: 100px 1fr 48px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
