/* Pahust — pahust.tepoyan.com
   One stylesheet, no build step, no external requests.
   The palette is lifted from the app's own design tokens
   (Sever/Assets.xcassets/Colors/*.colorset) so the site and the product
   are the same object in two media. Light values first, dark below. */

:root {
  color-scheme: light dark;

  --bg:            #F7F6F3;   /* appBackground */
  --surface:       #FFFFFF;   /* appSurface */
  --surface-2:     #EFEEEA;   /* appSurfaceSecondary */
  --separator:     #E3E2DD;   /* appSeparator */
  --text:          #17181B;   /* appTextPrimary */
  --text-2:        #5D6067;   /* appTextSecondary */
  --text-3:        #8E9198;   /* appTextTertiary */
  --accent:        #3A55D9;   /* appAccent */

  --good:          #3E8E5A;   /* appSolvencyGood */
  --warn:          #C7841E;   /* appSolvencyWarning */
  --critical:      #C4372C;   /* appSolvencyCritical */

  --tint-obligation: #6242AC;  --tint-obligation-fill: #EEEAF9;
  --tint-savings:    #0A6E63;  --tint-savings-fill:    #DEF1EE;
  --tint-spending:   #6E4A38;  --tint-spending-fill:   #F2EAE4;
  --tint-debt:       #A03C63;  --tint-debt-fill:       #FAE8EE;
  --tint-expense:    #1C6289;  --tint-expense-fill:    #DDEBF6;

  --radius:      14px;
  --radius-sm:   8px;
  --measure:     42rem;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
          "Segoe UI", Roboto, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #0D0E11;
    --surface:   #16181D;
    --surface-2: #1E2127;
    --separator: #2A2E36;
    --text:      #F4F4F2;
    --text-2:    #9DA1A9;
    --text-3:    #6B6F77;
    --accent:    #7C90FF;

    --good:      #57B87B;
    --warn:      #E0A33E;
    --critical:  #E25A4E;

    --tint-obligation: #BDABF5;  --tint-obligation-fill: #2C2448;
    --tint-savings:    #5FCFC2;  --tint-savings-fill:    #0F312D;
    --tint-spending:   #D3AC96;  --tint-spending-fill:   #3D2E24;
    --tint-debt:       #EFA0BC;  --tint-debt-fill:       #3D1F2B;
    --tint-expense:    #86C2E5;  --tint-expense-fill:    #142C3B;
  }
}

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

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

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

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- header ---------- */

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

.bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 0;
}

.wordmark {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.wordmark span {
  font-weight: 400;
  color: var(--text-3);
  margin-left: 8px;
  font-size: 16px;
}

nav { display: flex; gap: 18px; flex-wrap: wrap; }

nav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 15px;
}

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

/* ---------- type ---------- */

h1 {
  font-size: clamp(30px, 6vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 18px;
  max-width: 20ch;
}

h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 18px;
}

h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

p { margin: 0 0 16px; }

.lede {
  font-size: 20px;
  line-height: 1.5;
  color: var(--text-2);
  max-width: 34ch;
}

.small { font-size: 15px; color: var(--text-2); }
.tiny  { font-size: 13px; color: var(--text-3); }

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

section { padding: 56px 0; border-top: 1px solid var(--separator); }
section:first-of-type { border-top: none; }

.hero { padding-top: 64px; padding-bottom: 48px; }

/* ---------- the payday card ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--separator);
  border-radius: var(--radius);
  padding: 20px;
}

.card-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}

.payday-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--separator);
  flex-wrap: wrap;
}

.payday-date {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.payday-in { text-align: right; }

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.amount {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  white-space: nowrap;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--separator);
}

.row:last-of-type { border-bottom: none; }

.tick {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: 1.5px solid var(--text-3);
  flex: none;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: transparent;
  line-height: 1;
}

.tick.done {
  background: var(--good);
  border-color: var(--good);
  color: #FFFFFF;
}

.row-main { flex: 1 1 auto; min-width: 0; }
.row-title { font-size: 16px; }
.row-sub { font-size: 13px; color: var(--text-3); }

.chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.chip-obligation { color: var(--tint-obligation); background: var(--tint-obligation-fill); }
.chip-savings    { color: var(--tint-savings);    background: var(--tint-savings-fill); }
.chip-spending   { color: var(--tint-spending);   background: var(--tint-spending-fill); }
.chip-debt       { color: var(--tint-debt);       background: var(--tint-debt-fill); }
.chip-expense    { color: var(--tint-expense);    background: var(--tint-expense-fill); }

/* ---------- solvency strip ---------- */

.strip {
  display: flex;
  gap: 2px;
  margin-top: 22px;
}

.seg {
  height: 26px;
  flex: 1 1 0;
  border-radius: 2px;
  background: var(--good);
}

.seg.warn     { background: var(--warn); }
.seg.critical { background: var(--critical); }

.strip-legend {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 8px;
}

.verdict {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--separator);
  background: var(--surface-2);
  font-size: 15px;
}

.verdict strong { color: var(--critical); }

/* ---------- layout helpers ---------- */

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.stack > * + * { margin-top: 14px; }

ul.plain {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

ul.plain li {
  padding: 11px 0;
  border-bottom: 1px solid var(--separator);
}

ul.plain li:last-child { border-bottom: none; }

ul.bullets { padding-left: 1.1em; margin: 0 0 16px; }
ul.bullets li { margin-bottom: 8px; }

.refusals li::before {
  content: "×";
  color: var(--text-3);
  margin-right: 10px;
  font-weight: 600;
}

/* ---------- pricing ---------- */

.price {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.price small {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-3);
  letter-spacing: 0;
}

/* ---------- CTA ---------- */

.cta-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 26px; }

.cta {
  display: inline-block;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--text);
}

.cta:hover { opacity: 0.88; }

.cta-pending {
  background: transparent;
  color: var(--text-2);
  border: 1px dashed var(--separator);
  cursor: default;
}

/* ---------- prose pages ---------- */

.prose { padding-top: 44px; padding-bottom: 8px; }
.prose h1 { font-size: clamp(26px, 5vw, 34px); max-width: none; }
.prose h2 {
  font-size: 17px;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 34px 0 10px;
}
.prose h3 { font-size: 16px; margin: 22px 0 6px; }
.prose p, .prose li { color: var(--text-2); }
.prose strong { color: var(--text); font-weight: 600; }
.prose .updated { color: var(--text-3); font-size: 14px; margin-bottom: 30px; }

.callout {
  background: var(--surface);
  border: 1px solid var(--separator);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 20px 0;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 16px 0 22px;
  display: block;
  overflow-x: auto;
}

th, td {
  text-align: left;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--separator);
  vertical-align: top;
  color: var(--text-2);
}

th { color: var(--text); font-weight: 600; }

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--text);
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--separator);
  padding: 30px 0 46px;
  margin-top: 40px;
  font-size: 14px;
  color: var(--text-3);
}

footer nav { margin-bottom: 12px; }
footer a { color: var(--text-2); }

@media (max-width: 480px) {
  body { font-size: 16px; }
  .lede { font-size: 18px; }
  .payday-date { font-size: 22px; }
  section { padding: 44px 0; }
}
