/* ============================================
   scotpropinfo.co.uk — shared stylesheet
   ============================================ */

:root {
  --teal-50: #E1F5EE;
  --teal-100: #9FE1CB;
  --teal-400: #1D9E75;
  --teal-600: #0F6E56;
  --teal-800: #085041;
  --teal-900: #04342C;

  --text-primary: #1A1A1A;
  --text-secondary: #5F5E5A;
  --text-tertiary: #888780;

  --bg-page: #F4F4F2;
  --bg-card: #FFFFFF;
  --bg-secondary: #ECECE9;

  --border: #DEDEDA;
  --border-strong: #C5C5C0;

  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --amber-50: #FAEEDA;
  --amber-800: #633806;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.5;
}

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

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

header.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 17px;
  color: var(--text-primary);
}

.logo .ti { color: var(--teal-600); font-size: 22px; }

nav.main-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 14px;
  font-weight: 500;
}

nav.main-nav a { color: var(--text-secondary); }
nav.main-nav a.active,
nav.main-nav a:hover { color: var(--teal-600); }

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

footer.site-footer {
  margin-top: 3rem;
  padding: 2rem 1.25rem;
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border);
}

footer.site-footer a { color: var(--text-tertiary); text-decoration: underline; }

/* ---------- Hero / page intro ---------- */

.page-hero {
  padding: 2.5rem 0 1.5rem;
}

.page-hero h1 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.page-hero p.lede {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
  max-width: 560px;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--teal-50);
  color: var(--teal-800);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 20px;
  margin-top: 0.75rem;
}

/* ---------- Calculator card shell ---------- */

.calc-shell {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0 2.5rem;
}

.calc-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

/* ---------- How-to tip ---------- */

.howto {
  background: var(--teal-50);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 1rem;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.howto .ti { font-size: 16px; color: var(--teal-600); flex-shrink: 0; margin-top: 1px; }

.howto-text {
  font-size: 13px;
  color: var(--teal-800);
  line-height: 1.6;
}

.howto-text b { font-weight: 600; }

/* ---------- Form fields ---------- */

.field-label {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

.field-row { display: flex; align-items: center; }

input[type="text"], select {
  width: 100%;
  height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-card);
}

input[type="text"]:focus, select:focus {
  outline: none;
  border-color: var(--teal-600);
  box-shadow: 0 0 0 2px var(--teal-50);
}

.prefix, .suffix {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 600;
  flex-shrink: 0;
}

.prefix { width: 36px; border-radius: var(--radius-md) 0 0 var(--radius-md); border-right: none; }
.suffix { width: 40px; border-radius: 0 var(--radius-md) var(--radius-md) 0; border-left: none; }

.field-row input.with-prefix { border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.field-row input.with-suffix { border-radius: var(--radius-md) 0 0 var(--radius-md); }

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 480px) {
  .field-grid { grid-template-columns: 1fr; }
}

/* ---------- Selectable cards / chips ---------- */

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 480px) {
  .option-grid { grid-template-columns: 1fr; }
}

.option-card {
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  cursor: pointer;
  background: var(--bg-card);
}

.option-card:hover { border-color: var(--teal-600); }

.option-card.active {
  border: 2px solid var(--teal-600);
  background: var(--teal-50);
}

.option-card.active .opt-title,
.option-card.active .opt-sub { color: var(--teal-800); }

.opt-title { font-size: 13px; color: var(--text-primary); font-weight: 600; }
.opt-sub { font-size: 11px; color: var(--text-primary); font-weight: 500; margin-top: 2px; }

.chip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.chip {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  cursor: pointer;
  text-align: center;
  background: var(--bg-card);
}

.chip.active {
  border: 2px solid var(--teal-600);
  background: var(--teal-50);
}

.chip.active .opt-title,
.chip.active .opt-sub,
.chip.active .chip-value { color: var(--teal-800); }

.chip-value { font-size: 16px; font-weight: 600; color: var(--text-primary); }

/* ---------- Results panel ---------- */

.results-panel {
  background: var(--teal-600);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 480px) {
  .results-grid { grid-template-columns: 1fr; }
}

.result-item .r-label {
  font-size: 11px;
  color: var(--teal-100);
  font-weight: 600;
  margin-bottom: 2px;
}

.result-item .r-value {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.result-item.divider {
  border-left: 1px solid var(--teal-400);
  padding-left: 12px;
}

@media (max-width: 480px) {
  .result-item.divider { border-left: none; padding-left: 0; border-top: 1px solid var(--teal-400); padding-top: 12px; }
}

.results-single .r-value { font-size: 28px; }

/* ---------- Summary cards ---------- */

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 1rem;
}

.summary-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 10px;
}

.summary-card .s-label { font-size: 11px; color: var(--text-primary); font-weight: 600; }
.summary-card .s-value { font-size: 18px; font-weight: 600; margin-top: 2px; }

/* ---------- Toggle button ---------- */

.toggle-btn {
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 7px 14px;
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.toggle-btn:hover { background: var(--bg-secondary); }

.toggle-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 0.5rem;
}

.toggle-row.with-rate {
  justify-content: space-between;
}

.note-text {
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 600;
}

/* ---------- Breakdown ---------- */

.breakdown-panel {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-top: 0.5rem;
}

.band-block {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.band-block:last-child { border-bottom: none; }

.band-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.band-label { font-size: 13px; color: var(--text-primary); font-weight: 600; }
.band-amount { font-size: 13px; color: var(--text-primary); font-weight: 600; }
.band-amount.zero { opacity: 0.5; }
.band-formula { font-size: 11px; color: var(--text-primary); font-weight: 500; margin-bottom: 4px; }
.band-plain { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

.progress-track {
  height: 5px;
  background: var(--bg-secondary);
  border-radius: 3px;
  margin-bottom: 3px;
  overflow: hidden;
}

.progress-fill { height: 100%; border-radius: 3px; background: var(--teal-400); }
.progress-fill.zero { background: var(--border-strong); }

.summary-label { font-size: 13px; color: var(--text-primary); font-weight: 600; }

.breakdown-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0 0;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.breakdown-total .bt-value {
  font-size: 26px;
  font-weight: 600;
  color: var(--teal-600);
}

/* ---------- Disclaimer ---------- */

.disclaimer {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 1rem;
  line-height: 1.6;
}

/* ---------- Currency toggle ---------- */

.ccy-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

select.ccy-select {
  width: auto;
  height: 32px;
  font-size: 12px;
  padding: 0 8px;
}

.ccy-note {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 0.5rem;
}

/* ---------- Homepage calculator link cards ---------- */

.calc-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

@media (max-width: 720px) {
  .calc-link-grid { grid-template-columns: 1fr; }
}

.calc-link-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text-primary);
  display: block;
  transition: border-color 0.15s, transform 0.15s;
}

.calc-link-card:hover {
  border-color: var(--teal-600);
  transform: translateY(-2px);
  text-decoration: none;
}

.calc-link-card .ti {
  font-size: 28px;
  color: var(--teal-600);
  margin-bottom: 0.75rem;
  display: block;
}

.calc-link-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 0.4rem;
}

.calc-link-card p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* ---------- Guide pages ---------- */

.guide-breadcrumb {
  font-size: 12px;
  color: var(--teal-600);
  font-weight: 600;
  margin-bottom: 6px;
}

.toc-box {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.toc-box .toc-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.toc-box a {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

.guide-section { margin-bottom: 2rem; }

.guide-section h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 10px;
}

.guide-section p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
  margin: 0;
}

.scenario-list { display: flex; flex-direction: column; gap: 8px; }

.scenario-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.scenario-item .si-title { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.scenario-item .si-desc { font-size: 13px; color: var(--text-secondary); }

.faq-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.faq-question {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-answer {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.6;
  display: none;
}

.faq-item.open .faq-answer { display: block; }
.faq-item.open .faq-question .ti { transform: rotate(180deg); }

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 480px) {
  .glossary-grid { grid-template-columns: 1fr; }
}

.glossary-term { font-weight: 600; font-size: 13px; }
.glossary-def { font-size: 12px; color: var(--text-secondary); }

.guide-disclaimer {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.6;
  margin-top: 1.5rem;
}

.guide-link-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 1.5rem;
}
