/* =============================================================================
   aupaycalculator.com — styles
   Aesthetic: warm editorial-fintech. Cream paper, deep forest ink, eucalyptus
   green primary, clay for deductions, teal for super. Fraunces + Hanken Grotesk.
   Mobile-first; performance-conscious (no images, 2 font families).
   ============================================================================= */

:root {
  --paper:      #f4f0e6;
  --paper-2:    #ece5d6;
  --surface:    #fbf9f3;
  --ink:        #15231c;
  --ink-soft:   #51605a;
  --ink-faint:  #8a948e;
  --line:       rgba(21, 35, 28, 0.12);
  --line-soft:  rgba(21, 35, 28, 0.07);

  --green:        #1c7a4e;
  --green-bright: #23a36a;
  --green-deep:   #0f5234;
  --clay:         #c1572f;
  --clay-soft:    #e9a98f;
  --teal:         #2c7c94;
  --teal-soft:    #9fc6d2;
  --gold:         #b78a2e;

  --shadow-sm: 0 1px 2px rgba(21,35,28,.06), 0 2px 8px rgba(21,35,28,.05);
  --shadow-md: 0 4px 14px rgba(21,35,28,.08), 0 18px 40px rgba(21,35,28,.07);

  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --maxw: 1160px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 85% -5%, rgba(35,163,106,.10), transparent 60%),
    radial-gradient(900px 500px at -5% 10%, rgba(44,124,148,.08), transparent 55%),
    var(--paper);
  background-attachment: fixed;
  line-height: 1.6;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--green-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--green); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 560; line-height: 1.1; letter-spacing: -0.01em; color: var(--ink); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244,240,230,.82);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(150deg, var(--green-bright), var(--green-deep));
  display: grid; place-items: center; color: #fff; font-size: 16px; font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.brand b { color: var(--green-deep); }
.fy-badge {
  font-size: .8rem; font-weight: 600; color: var(--green-deep);
  background: rgba(35,163,106,.12); border: 1px solid rgba(35,163,106,.28);
  padding: 5px 11px; border-radius: 999px;
}

/* ---------- hero ---------- */
.hero { padding: 46px 0 18px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--green-deep); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--green); display: inline-block; }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 3.7rem); margin: 0 0 14px; max-width: 16ch; }
.hero h1 .accent { color: var(--green); font-style: italic; }
.hero .lede { font-size: clamp(1.05rem, 2vw, 1.22rem); color: var(--ink-soft); max-width: 56ch; margin: 0; }

.anim { opacity: 0; transform: translateY(12px); animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .14s; } .d3 { animation-delay: .23s; } .d4 { animation-delay: .32s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .anim { animation: none; opacity: 1; transform: none; } }

/* ---------- calculator ---------- */
.calc {
  display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 0; margin: 30px 0 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.panel { padding: 30px clamp(20px, 3vw, 36px); }
.panel-inputs { border-right: 1px solid var(--line); }
.panel-title { font-size: .82rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 18px; }

.field { margin-bottom: 16px; }
.field > label { display: block; font-size: .9rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field .hint { font-size: .8rem; color: var(--ink-faint); font-weight: 500; }

.input, .select {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-sm);
  padding: 11px 13px; transition: border-color .15s, box-shadow .15s;
  font-variant-numeric: tabular-nums;
}
.input:focus, .select:focus { outline: none; border-color: var(--green-bright); box-shadow: 0 0 0 3px rgba(35,163,106,.16); }
.select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2351605a' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; padding-right: 36px;
}

.amount-wrap { position: relative; }
.amount-wrap .cur { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-faint); font-weight: 600; pointer-events: none; }
.amount-wrap .input { padding-left: 28px; font-size: 1.18rem; font-weight: 600; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* segmented control */
.seg-ctrl { display: flex; background: var(--paper-2); border-radius: var(--r-sm); padding: 3px; gap: 2px; }
.seg-ctrl input { position: absolute; opacity: 0; pointer-events: none; }
.seg-ctrl label { flex: 1; text-align: center; font-size: .88rem; font-weight: 600; color: var(--ink-soft); padding: 8px 6px; border-radius: 7px; cursor: pointer; transition: all .15s; }
.seg-ctrl input:checked + label { background: var(--surface); color: var(--green-deep); box-shadow: var(--shadow-sm); }

/* toggles */
.toggle { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: var(--r-sm); cursor: pointer; transition: border-color .15s, background .15s; margin-bottom: 10px; }
.toggle:hover { border-color: var(--green-bright); }
.toggle input { position: absolute; opacity: 0; }
.toggle .sw { width: 38px; height: 22px; border-radius: 999px; background: #cfc8b8; position: relative; flex: none; transition: background .18s; }
.toggle .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .18s; }
.toggle input:checked ~ .sw { background: var(--green-bright); }
.toggle input:checked ~ .sw::after { transform: translateX(16px); }
.toggle .tl { font-size: .92rem; font-weight: 600; }
.toggle .tl small { display: block; font-size: .78rem; color: var(--ink-faint); font-weight: 500; }

.adv-summary { font-size: .85rem; font-weight: 700; color: var(--green-deep); cursor: pointer; padding: 8px 0; list-style: none; display: flex; align-items: center; gap: 7px; }
.adv-summary::-webkit-details-marker { display: none; }
.adv-summary::before { content: "+"; font-size: 1.1rem; line-height: 1; }
details[open] .adv-summary::before { content: "–"; }

/* ---------- results ---------- */
.panel-results { background: linear-gradient(180deg, #fcfaf4, #f7f3ea); position: relative; }
.results.is-empty .res-body { opacity: .35; filter: grayscale(.4); }
.net-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.net-figure .net-big { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.8rem, 6vw, 4rem); line-height: 1; color: var(--green-deep); letter-spacing: -0.02em; }
.net-figure .net-label { font-size: .9rem; color: var(--ink-soft); font-weight: 600; margin-top: 6px; }
.net-sub { font-size: .9rem; color: var(--ink-faint); margin: 4px 0 18px; font-weight: 500; }
.out-period { font-size: .85rem; }

.bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--paper-2); margin-bottom: 18px; box-shadow: inset 0 1px 2px rgba(0,0,0,.06); }
.bar span { display: block; min-width: 2px; transition: flex-grow .3s; }
.seg-tax  { background: var(--clay); }
.seg-med  { background: #d98a5e; }
.seg-help { background: var(--gold); }
.seg-ss   { background: var(--teal-soft); }
.seg-net  { background: linear-gradient(90deg, var(--green-bright), var(--green)); }

.breakdown { margin-bottom: 16px; }
.bd-row { display: flex; align-items: baseline; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.bd-label { font-size: .95rem; color: var(--ink-soft); font-weight: 500; }
.bd-label small { display: block; font-size: .76rem; color: var(--ink-faint); }
.bd-val { font-size: 1rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.bd-row.is-gross .bd-val { color: var(--ink); }
.bd-row.is-minus .bd-val { color: var(--clay); }
.bd-row.is-net { border-bottom: none; margin-top: 4px; padding-top: 14px; border-top: 2px solid var(--ink); }
.bd-row.is-net .bd-label { font-weight: 700; color: var(--ink); font-size: 1.02rem; }
.bd-row.is-net .bd-val { color: var(--green-deep); font-size: 1.45rem; font-family: var(--font-display); }
.bd-divider { height: 0; }
.bd-row.is-super .bd-val { color: var(--teal); }
.bd-row.is-super-total { border-bottom: none; }
.bd-row.is-super-total .bd-val { color: var(--teal); }

.rate-chips { display: flex; gap: 10px; margin-bottom: 4px; }
.chip { flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; }
.chip .ck { font-size: .76rem; color: var(--ink-faint); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.chip .cv { font-size: 1.4rem; font-weight: 600; font-family: var(--font-display); color: var(--ink); }
.chip.avg .cv { color: var(--clay); }
.chip.marg .cv { color: var(--ink); }

.prov-note { font-size: .78rem; color: var(--ink-faint); margin-top: 14px; padding: 10px 12px; background: rgba(183,138,46,.09); border-radius: var(--r-sm); border: 1px solid rgba(183,138,46,.2); }

/* period table */
.period-table-wrap { margin-top: 22px; }
.period-table-wrap h3 { font-size: 1rem; margin: 0 0 10px; }
table.periods { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
table.periods th { text-align: right; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); font-weight: 700; padding: 6px 8px; border-bottom: 1.5px solid var(--line); }
table.periods th:first-child, table.periods td:first-child { text-align: left; }
table.periods td { padding: 9px 8px; text-align: right; border-bottom: 1px solid var(--line-soft); color: var(--ink-soft); }
table.periods td.t-net { color: var(--green-deep); font-weight: 700; }
table.periods tr:last-child td { border-bottom: none; }

/* ---------- content ---------- */
.section { padding: 40px 0; }
.section h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin: 0 0 8px; }
.section .sub { color: var(--ink-soft); max-width: 62ch; margin: 0 0 26px; }
.prose { max-width: 70ch; }
.prose p { margin: 0 0 16px; color: #2a3530; }
.prose h3 { font-size: 1.3rem; margin: 30px 0 10px; }

.callout {
  border-left: 4px solid var(--green); background: var(--surface);
  border-radius: 0 var(--r-md) var(--r-md) 0; padding: 18px 22px; margin: 24px 0;
  box-shadow: var(--shadow-sm);
}
.callout.warn { border-left-color: var(--clay); }
.callout strong { color: var(--green-deep); }
.callout.warn strong { color: var(--clay); }

.data-table { width: 100%; border-collapse: collapse; margin: 18px 0 8px; font-variant-numeric: tabular-nums; background: var(--surface); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.data-table th, .data-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line-soft); }
.data-table th { background: var(--paper-2); font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); font-weight: 700; }
.data-table td:last-child, .data-table th:last-child { text-align: right; }
.data-table tr:last-child td { border-bottom: none; }
.data-table caption { caption-side: bottom; font-size: .8rem; color: var(--ink-faint); padding-top: 10px; text-align: left; }

.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 8px 0; }
.mini-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; box-shadow: var(--shadow-sm); }
.mini-card .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 12px; font-weight: 700; color: #fff; }
.mini-card h3 { font-size: 1.08rem; margin: 0 0 6px; }
.mini-card p { font-size: .92rem; color: var(--ink-soft); margin: 0; }

/* FAQ */
.faq { max-width: 76ch; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { font-family: var(--font-display); font-size: 1.12rem; font-weight: 560; cursor: pointer; padding: 16px 36px 16px 0; position: relative; list-style: none; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 1.5rem; color: var(--green); font-family: var(--font-body); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .ans { padding: 0 0 18px; color: #2a3530; }
.faq .ans p { margin: 0 0 10px; }

/* internal links */
.links-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.link-tile { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s; box-shadow: var(--shadow-sm); }
.link-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--green-bright); color: var(--ink); }
.link-tile .lt-title { font-weight: 700; font-size: 1rem; display: flex; align-items: center; justify-content: space-between; }
.link-tile .lt-title::after { content: "→"; color: var(--green); }
.link-tile .lt-desc { font-size: .86rem; color: var(--ink-soft); margin-top: 4px; }

/* footer / disclaimer */
.site-foot { border-top: 1px solid var(--line); margin-top: 30px; padding: 34px 0 50px; background: var(--paper-2); }
.author { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.author .av { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(150deg, var(--teal), var(--green-deep)); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; flex: none; }
.author .meta { font-size: .9rem; }
.author .meta b { display: block; }
.author .meta span { color: var(--ink-faint); }
.disclaimer { font-size: .84rem; color: var(--ink-soft); max-width: 80ch; }
.disclaimer a { color: var(--green-deep); }
.foot-bottom { margin-top: 22px; font-size: .82rem; color: var(--ink-faint); display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .calc { grid-template-columns: 1fr; }
  .panel-inputs { border-right: none; border-bottom: 1px solid var(--line); }
  .cards-3 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .panel { padding: 22px 18px; }
  .hero { padding: 32px 0 10px; }
  .rate-chips { flex-direction: column; }
  .net-figure .net-big { font-size: 3.1rem; }
  table.periods { font-size: .84rem; }
  table.periods th, table.periods td { padding: 7px 5px; }
}

/* =============================================================================
   Shift / hourly page (Fase 2) — reuses the home design system
   ============================================================================= */

/* simple topbar nav */
.topnav { display: flex; gap: 18px; align-items: center; }
.topnav a { font-size: .9rem; font-weight: 600; color: var(--ink-soft); text-decoration: none; }
.topnav a:hover { color: var(--green-deep); }
@media (max-width: 560px) { .topnav { display: none; } }

/* penalty band rows */
.bands { margin-bottom: 4px; }
.band {
  display: grid; grid-template-columns: 1fr 96px; gap: 12px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line-soft);
}
.band:last-child { border-bottom: none; }
.band .band-label { font-size: .95rem; font-weight: 600; color: var(--ink); }
.band .band-label .mult {
  display: inline-block; margin-left: 8px; font-size: .76rem; font-weight: 700;
  color: var(--green-deep); background: rgba(35,163,106,.12);
  border: 1px solid rgba(35,163,106,.28); padding: 2px 8px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.band .band-label small { display: block; font-size: .76rem; color: var(--ink-faint); font-weight: 500; margin-top: 1px; }
.band input { text-align: right; }

/* rate input emphasis */
.rate-big .input { font-size: 1.18rem; font-weight: 600; }

/* converter mini-widget */
.converter {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px clamp(20px,3vw,32px); box-shadow: var(--shadow-sm); margin: 8px 0;
}
.converter h3 { font-size: 1.2rem; margin: 0 0 6px; }
.converter .sub { color: var(--ink-soft); font-size: .92rem; margin: 0 0 18px; }
.conv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap: 14px; }
.conv-out { background: var(--paper-2); border-radius: var(--r-md); padding: 14px 16px; text-align: center; }
.conv-out .co-k { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); font-weight: 700; }
.conv-out .co-v { font-size: 1.35rem; font-weight: 600; font-family: var(--font-display); color: var(--green-deep); font-variant-numeric: tabular-nums; }

/* total hours pill in results */
.hours-pill { font-size: .82rem; color: var(--ink-soft); font-weight: 600; background: var(--paper-2); padding: 4px 10px; border-radius: 999px; }
