/* CFA Standard Agreements — house style.
 *
 * Matched to balances.cinematographyforactors.com so the institute's two back-office
 * services read as one. Same tokens, same system font stack, same quiet card.
 *
 * This is paperwork a customer signs and files. It should read like a document from an
 * institution: sentence case, plain type, generous line height, no webfonts, no
 * uppercase shouting, no motion. Restraint is the brand here.
 *
 * Most customers fill this in on a phone between setups (scope section 6), so the
 * layout is mobile-first and inputs never drop below 16px.
 */

:root {
  --ink: #1e2430;
  --sub: #5b6472;
  --line: #e5e8ee;
  --accent: #0f7d7a;
  --accent-dark: #0b625f;
  --bg: #f6f7f9;
  --card: #ffffff;
  --good: #0f7d7a;
  --bad: #b4232a;
  --warn-bg: #fdf6ec;
  --measure: 44rem;
  --font: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font);
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--card); padding: .5rem .75rem; }

/* --- masthead ------------------------------------------------------------ */
header.masthead { background: var(--card); border-bottom: 1px solid var(--line); padding: 1rem 1.25rem; }
.masthead-inner, main, footer .inner { max-width: var(--measure); margin: 0 auto; }
.masthead-inner { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; justify-content: space-between; }

.wordmark { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); }
.mark { height: 34px; width: auto; flex: none; display: block; }
.wordmark .name { font-size: 1.05rem; font-weight: 700; line-height: 1.2; }
.wordmark .sub { display: block; font-size: .78rem; font-weight: 400; color: var(--sub); }

nav.masthead-nav { font-size: .88rem; }
nav.masthead-nav a { margin-left: 1rem; }
nav.masthead-nav form { display: inline; margin-left: 1rem; }
nav.masthead-nav button {
  font: inherit; background: none; border: 0; color: var(--accent);
  cursor: pointer; padding: 0; text-decoration: underline;
}

main { padding: 2rem 1.25rem 3rem; }

/* --- type ---------------------------------------------------------------- */
h1 { font-size: 1.6rem; line-height: 1.25; font-weight: 700; margin: 0 0 .6rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; font-weight: 700; margin: 2rem 0 .6rem; }
h3 { font-size: 1rem; font-weight: 600; margin: 0 0 .3rem; }
.lede { color: var(--sub); margin: 0 0 1.5rem; }
.eyebrow { font-size: .78rem; color: var(--sub); margin: 0 0 .5rem; }

/* --- surfaces ------------------------------------------------------------ */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1.5rem; margin-bottom: 1rem; }
.meta { font-size: .82rem; color: var(--sub); }
.status {
  display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; padding: .18rem .5rem; border-radius: 999px;
  background: #eef1f5; color: var(--sub); border: 1px solid var(--line);
}
.status.ready { background: #e7f3f2; color: var(--accent-dark); border-color: #cfe6e4; }
.notice {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  padding: .85rem 1rem; background: var(--card); border-radius: 8px; margin-bottom: 1.25rem;
}
.notice p:first-child { margin-top: 0; }
.notice p:last-child { margin-bottom: 0; }
.notice.plain { border-left-color: var(--line); background: #fbfcfd; }

ol.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
ol.steps li { counter-increment: step; border-top: 1px solid var(--line); padding: .95rem 0; }
ol.steps li::before {
  content: "Step " counter(step);
  display: block; font-size: .78rem; color: var(--sub); margin-bottom: .15rem;
}

/* --- guidance ------------------------------------------------------------ */
details.explainer { border-top: 1px solid var(--line); padding: .6rem 0; }
details.explainer > summary {
  cursor: pointer; font-size: .9rem; font-weight: 600; color: var(--ink); list-style: none;
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
}
details.explainer > summary::-webkit-details-marker { display: none; }
details.explainer > summary::after { content: "+"; color: var(--sub); font-weight: 400; }
details.explainer[open] > summary::after { content: "–"; }
details.explainer .body { font-size: .93rem; color: var(--ink); padding-top: .5rem; }
details.explainer .body p:first-child { margin-top: .25rem; }
.source { font-size: .8rem; color: var(--sub); }
.source a { color: var(--sub); }
.disclaimer {
  font-size: .82rem; color: var(--sub); background: var(--warn-bg);
  border: 1px solid #f0e3cd; border-radius: 8px; padding: .7rem .9rem; margin: 1rem 0;
}

/* --- forms --------------------------------------------------------------- */
form .field { margin-bottom: 1.2rem; }
label { display: block; font-size: .92rem; font-weight: 600; margin-bottom: .3rem; }
.hint { display: block; font-size: .85rem; color: var(--sub); margin-top: .3rem; font-weight: 400; }
input[type=text], input[type=email], input[type=date], select, textarea {
  width: 100%; padding: .6rem .7rem; font-size: 1rem; font-family: inherit;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink);
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
select[multiple] { min-height: 9rem; }
textarea { min-height: 5rem; }
fieldset { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 1.1rem 1.25rem; margin: 0 0 1.2rem; }
legend { font-size: .95rem; font-weight: 700; padding: 0 .4rem; }
.check { display: flex; gap: .55rem; align-items: flex-start; margin-bottom: .55rem; }
.check input { margin-top: .35rem; }
.check label { margin: 0; font-weight: 400; }

button, .button {
  font: inherit; font-size: .95rem; font-weight: 600;
  padding: .65rem 1.15rem; cursor: pointer; border-radius: 8px;
  background: var(--accent); color: #fff; border: 1px solid var(--accent);
  text-decoration: none; display: inline-block;
}
button:hover, .button:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
button.secondary, .button.secondary { background: var(--card); color: var(--ink); border-color: var(--line); }
button.secondary:hover { background: #eef1f5; color: var(--ink); }
button.quiet { background: transparent; color: var(--sub); border-color: var(--line); }

.error { color: var(--bad); font-size: .88rem; margin-top: .3rem; }

dl.detail { margin: 0; }
dl.detail dt { font-size: .8rem; color: var(--sub); margin-top: .95rem; }
dl.detail dd { margin: .15rem 0 0; }

table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .82rem; color: var(--sub); font-weight: 600; }
.table-scroll { overflow-x: auto; }

footer {
  border-top: 1px solid var(--line); background: var(--card);
  padding: 1.5rem 1.25rem; font-size: .82rem; color: var(--sub);
}
footer p { margin: .35rem 0; }

@media (min-width: 46rem) {
  h1 { font-size: 1.9rem; }
  main { padding-top: 2.5rem; }
}
