/* Freelance hourly rate calculator: page-only styles. Builds on ../style.css and keeps its Ledger look.
   Everything here is prefixed fr- so it can't collide with other pages. */

.fr-head { padding-block: 26px 4px; }
.fr-head h1 { font-size: var(--step-3); max-width: none; margin-top: 6px; }

.fr-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px 40px; align-items: start; padding-top: 18px; }
.fr-stage { position: sticky; top: 12px; display: grid; min-width: 0; }
.fr-answer { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 18px; }
.fr-answer .label { flex-basis: 100%; font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.fr-answer .big { font-size: clamp(2.8rem, 2rem + 2.6vw, 4.2rem); color: var(--gold); }
.fr-answer .big small { font-size: 0.9rem; font-family: var(--font-body); letter-spacing: 0; color: var(--muted); margin-left: 10px; }
.fr-answer .answer-line { padding-bottom: 6px; max-width: 48ch; }
.fr-answer .example-tag { flex-basis: 100%; }

/* Waterfall */
.fr-fall-fig { margin: 0; padding-top: 18px; }
.fr-fall-cap { font-size: 0.78rem; font-weight: 600; color: var(--muted); padding-bottom: 8px; border-bottom: 1px solid var(--ink); margin-bottom: 8px; }
.fr-fall { position: relative; min-height: 200px; }
.fr-fall svg { display: block; overflow: visible; }
.fr-fall .fr-name { fill: var(--ink); font-size: 14px; font-weight: 600; }
.fr-fall .is-total .fr-name { font-family: var(--font-body); font-size: 15px; font-weight: 700; }
.fr-fall .fr-sub { fill: var(--muted); font-size: 11.5px; paint-order: stroke; stroke: var(--paper); stroke-width: 5px; stroke-linejoin: round; }
.fr-fall .fr-track { stroke: var(--grid); stroke-width: 1; }
.fr-fall .fr-link { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; opacity: 0.7; }
.fr-fall .fr-sum-line { stroke: var(--line); }
.fr-fall .fr-val { fill: var(--ink); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fr-fall .fr-val.is-keep { fill: var(--gold); }
.fr-fall .fr-val.is-total { font-family: var(--font-body); font-size: 15px; font-weight: 700; }
.fr-fall .b-keep { fill: var(--gold-area); }
.fr-fall .b-tax { fill: var(--base-fill); }
.fr-fall .b-costs { fill: var(--slate); fill-opacity: 0.85; }
.fr-fall .fr-bar-edge { fill: none; stroke-width: 1.3; }
.fr-fall .fr-bar-edge.b-off { stroke: var(--muted); }
.fr-fall .fr-bar-edge.b-admin { stroke: var(--slate); }
.fr-fall .b-total { fill: var(--ink); }
.fr-fall .h-off-bg, .fr-fall .h-admin-bg { fill: var(--paper); }
.fr-fall .h-off-ln { stroke: var(--muted); stroke-width: 2.2; }
.fr-fall .h-admin-ln { stroke: var(--slate); stroke-width: 2.2; }
.fr-fall .bird { fill: var(--ink); }

.stats.fr-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 20px; }
.fr-stats .sub { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.fr-stats .v.is-gain { color: var(--gold); }

/* Inputs panel */
.fr-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 18px; display: grid; gap: 4px; min-width: 0; }
.fr-panel-head { display: grid; gap: 10px; padding-bottom: 12px; }
.fr-panel-head h2 { font-size: 1.45rem; }
.fr-panel-head .btn-row { flex-wrap: nowrap; }
.fr-panel-head .inline-field { flex: 1; min-width: 0; }
.fr-panel-head .inline-field select { width: 100%; }
.fr-form { display: grid; border-top: 1px solid var(--ink); }
.fr-col { border: 0; margin: 0; padding: 14px 0; display: grid; gap: 10px; min-width: 0; align-content: start; }
.fr-col + .fr-col { border-top: 1px solid var(--line); }
.fr-col:last-child { padding-bottom: 4px; }
.fr-col legend { float: left; width: 100%; padding: 0; font-family: var(--font-display); font-size: 1.05rem; }
.fr-col legend + * { clear: both; }
.fr-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: 10px; }
.fr-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fr-col .hint { font-size: 0.78rem; line-height: 1.35; margin-top: -4px; }
.fr-col .hint + .hint { margin-top: -8px; }
.fr-panel .pct.unit input { padding-right: 40px; }
.fr-panel .privacy { margin-top: 8px; }
.fr-panel .errors { margin-top: 8px; }

/* Your year, week by week */
.fr-hours, .fr-what { padding-top: 56px; }
.fr-hours h2, .fr-what h2 { margin-bottom: 10px; }
.fr-msg { font-size: 1.05rem; max-width: 72ch; margin-bottom: 18px; }
.fr-msg b { font-weight: 700; }
.fr-msg .note { color: var(--muted); font-size: 0.85rem; }
.fr-weeks svg { display: block; }
.fr-weeks .wk-bill { fill: var(--gold-area); }
.fr-weeks .wk-admin { fill: var(--slate); fill-opacity: 0.35; }
.fr-weeks .wk-off { fill: none; stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 2; opacity: 0.8; }
.fr-weeks .baseline { stroke: var(--ink); }
.fr-weeks .ax { fill: var(--muted); font-size: 11.5px; }
.fr-week-labels { display: flex; gap: 12px 40px; flex-wrap: wrap; margin-top: 12px; }
.fr-week-labels div { display: grid; gap: 1px; min-width: 0; }
.fr-week-labels b { font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; font-variant-numeric: lining-nums tabular-nums; line-height: 1.2; }
.fr-week-labels span { font-size: 0.8rem; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.fr-week-labels .is-gain b { color: var(--gold); }
.fr-chip-bill { width: 12px; height: 10px; border: 0; border-radius: 2px; background: var(--gold-area); }
.fr-chip-admin { width: 12px; height: 10px; border: 0; border-radius: 2px; background: var(--slate); opacity: 0.45; }
.fr-chip-off { width: 12px; height: 10px; border: 1px dashed var(--muted); border-radius: 2px; background: none; }

/* What if */
.fr-cols { display: flex; align-items: stretch; gap: 10px; height: 190px; border-bottom: 1px solid var(--ink); max-width: 720px; margin-bottom: 44px; }
.fr-c { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; position: relative; padding-bottom: 0; }
.fr-c-v { font-size: 0.85rem; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; color: var(--muted); padding-bottom: 4px; white-space: nowrap; }
.fr-c-bar { display: block; background: var(--muted); opacity: 0.3; border-radius: 3px 3px 0 0; max-height: calc(100% - 22px); }
.fr-c-l { position: absolute; top: 100%; left: 0; right: 0; text-align: center; font-size: 0.8rem; color: var(--muted); padding-top: 6px; font-variant-numeric: tabular-nums; }
.fr-c-l em { display: block; font-style: normal; font-family: var(--font-display); color: var(--gold); font-size: 0.85rem; }
.fr-c.is-cur .fr-c-bar { background: var(--gold-area); opacity: 1; }
.fr-c.is-cur .fr-c-v { color: var(--gold); font-size: 0.95rem; }
.fr-what { padding-bottom: 40px; }

/* One content width: reading sections use the full width, heading left, text right. */
.fr-page .prose, .fr-page .disclaimer { max-width: none; }
@media (min-width: 900px) {
  .fr-page .section.prose { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); column-gap: 48px; row-gap: 0; align-items: start; }
  .fr-page .section.prose > h2 { grid-column: 1; grid-row: 1 / span 30; }
  .fr-page .section.prose > :not(h2) { grid-column: 2; margin-bottom: 16px; }
}

/* Sizes */
@media (max-width: 1200px) and (min-width: 961px) { .fr-workspace { grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; } }
@media (max-width: 960px) {
  .fr-workspace { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .fr-stage { display: contents; }
  .fr-stage .fr-answer { order: 1; }
  .fr-panel { order: 2; margin-top: 16px; }
  .fr-stage .fr-fall-fig { order: 3; padding-top: 28px; }
  .fr-stage .fr-stats { order: 4; margin-top: 24px; }
}
@media (max-width: 960px) and (min-width: 600px) {
  .fr-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 18px; }
  .fr-col + .fr-col { border-top: 0; border-left: 1px solid var(--line); padding-left: 18px; }
}
@media (max-width: 640px) {
  .stats.fr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .fr-head { padding-block: 16px 0; }
  .fr-head h1 { font-size: 1.6rem; }
  .fr-head .eyebrow { display: none; }
  .fr-answer { gap: 2px 14px; }
  .fr-answer .big { font-size: 2.8rem; }
  .fr-answer .big small { font-size: 0.8rem; margin-left: 6px; }
  .fr-answer .label { display: none; }
  .fr-answer .answer-line { font-size: 0.85rem; flex-basis: 100%; padding-bottom: 0; }
  .fr-panel { padding: 14px 14px 16px; margin-inline: -4px; margin-top: 12px; }
  .fr-panel-head { padding-bottom: 10px; }
  .fr-fall .fr-name { font-size: 13.5px; }
  .fr-fall .is-total .fr-name { font-size: 15px; }
  .fr-week-labels { gap: 10px 22px; }
  .fr-week-labels b { font-size: 1.1rem; }
  .fr-cols { gap: 5px; height: 160px; }
  .fr-c-v { font-size: 0.72rem; }
  .fr-c.is-cur .fr-c-v { font-size: 0.8rem; }
}
.fr-empty { height: 300px; border: 1px dashed var(--line); border-radius: var(--radius); display: grid; place-items: center; color: var(--muted); font-family: var(--font-body); font-style: normal; }
@media (max-width: 600px) { .fr-empty { height: 200px; } }

/* Keep the currency picker readable: it used to shrink to an empty box next to Example, Share and Clear.
   The buttons wrap onto a second line when they don't fit beside it. */
.fr-panel-head .btn-row { flex-wrap: wrap; row-gap: 6px; }
.fr-panel-head .inline-field { flex: 1 1 8rem; min-width: 8rem; }
