/* ---------------------------------------------------------------------------
   Maryland Divorce Intake Portal

   Two typefaces doing two jobs. Content is set in a serif because that is what
   the documents themselves are set in, and because a client reading their own
   sworn statement should feel they are reading a document rather than filling
   in a web form. Interface controls — buttons, labels, status — are sans, so
   the boundary between "this is the record" and "this is the machinery" is
   legible without needing a rule drawn around it.

   The palette is deliberately quiet. People arrive here in the middle of a
   divorce; the interface should be calm, unhurried and unmistakably a law
   office rather than a product. One accent colour, spent only on the primary
   action of a page.
   --------------------------------------------------------------------------- */

:root {
    --paper:      #fcfcfa;
    --paper-sunk: #f4f3ef;
    --ink:        #16232e;
    --ink-soft:   #55636e;
    --rule:       #dcd9d2;
    --accent:     #7c5a2a;
    --accent-lift:#96703b;
    --alert:      #8a2c25;
    --affirm:     #2f5d45;

    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
             Georgia, serif;
    --sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
             Arial, sans-serif;

    --measure: 34rem;
}

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

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--serif);
    font-size: 1.0625rem;
    line-height: 1.65;
}

/* --- Masthead ----------------------------------------------------------- */

.masthead {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    align-items: baseline;
    justify-content: space-between;
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid var(--rule);
}

.masthead__firm {
    font-family: var(--serif);
    font-size: 1.125rem;
    letter-spacing: 0.01em;
    color: var(--ink);
    text-decoration: none;
}

.masthead__session {
    font-family: var(--sans);
    font-size: 0.8125rem;
    color: var(--ink-soft);
}

.masthead__session a {
    color: var(--ink-soft);
    margin-left: 1rem;
}

/* --- Sheet -------------------------------------------------------------- */

.sheet {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 3rem 1.75rem 4rem;
}

h1 {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.25;
    margin: 0 0 0.75rem;
}

h2 {
    font-size: 1.1875rem;
    font-weight: 600;
    margin: 2.5rem 0 0.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--rule);
}

.sheet > h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 1.5rem; }

.lede {
    color: var(--ink-soft);
    margin: 0 0 2rem;
}

p { margin: 0 0 1rem; }

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

/* --- Notices ------------------------------------------------------------ */

.notice {
    font-family: var(--sans);
    font-size: 0.9375rem;
    line-height: 1.5;
    padding: 0.75rem 1rem;
    margin: 0 0 1.5rem;
    border-left: 3px solid var(--ink-soft);
    background: var(--paper-sunk);
}

.notice--error   { border-left-color: var(--alert); }
.notice--success { border-left-color: var(--affirm); }

/* --- Fields ------------------------------------------------------------- */

.field { margin: 0 0 1.5rem; }

.field label {
    display: block;
    font-family: var(--sans);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.3125rem;
}

.req { color: var(--alert); }

.field input {
    width: 100%;
    font-family: var(--serif);
    font-size: 1.0625rem;
    color: var(--ink);
    background: #fff;
    padding: 0.5rem 0.625rem;
    border: 1px solid var(--rule);
    border-radius: 2px;
}

.field input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-color: var(--accent);
}

.field input:disabled {
    background: var(--paper-sunk);
    color: var(--ink-soft);
}

/* A prefilled value is an assertion the firm made, not something the client
   said yet. Marking it keeps the confirmation step honest — the client is
   being asked to look, not just to scroll past. */
.field__origin,
.field__query {
    font-family: var(--sans);
    font-size: 0.8125rem;
    line-height: 1.45;
    margin: 0 0 0.375rem;
    color: var(--ink-soft);
}

.field__query { color: var(--alert); }

.field--query input { border-color: var(--alert); }

.field--locked label { color: var(--ink-soft); }

/* --- Buttons ------------------------------------------------------------ */

.button {
    display: inline-block;
    font-family: var(--sans);
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.2;
    padding: 0.625rem 1.25rem;
    border: 1px solid var(--accent);
    border-radius: 2px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.button:hover  { background: var(--accent-lift); border-color: var(--accent-lift); color: #fff; }
.button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.button--quiet {
    background: transparent;
    color: var(--ink);
    border-color: var(--rule);
}

.button--quiet:hover { background: var(--paper-sunk); color: var(--ink); }

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rule);
}

/* --- Queue -------------------------------------------------------------- */

.queue { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }

.queue th {
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: left;
    color: var(--ink-soft);
    padding: 0 0.75rem 0.5rem 0;
    border-bottom: 1px solid var(--rule);
}

.queue td {
    padding: 0.6875rem 0.75rem 0.6875rem 0;
    border-bottom: 1px solid var(--rule);
    vertical-align: baseline;
}

.status {
    font-family: var(--sans);
    font-size: 0.75rem;
    color: var(--ink-soft);
    white-space: nowrap;
}

.status--submitted,
.status--changes_requested { color: var(--alert); }
.status--approved,
.status--delivered { color: var(--affirm); }

.empty {
    font-family: var(--sans);
    font-size: 0.9375rem;
    color: var(--ink-soft);
    padding: 2rem 0;
}

/* --- Colophon ----------------------------------------------------------- */

.colophon {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 1.5rem 1.75rem 3rem;
    border-top: 1px solid var(--rule);
    font-family: var(--sans);
    font-size: 0.8125rem;
    color: var(--ink-soft);
}

.colophon p { margin: 0; }

/* --- Login -------------------------------------------------------------- */

.sheet--narrow { max-width: 24rem; padding-top: 4rem; }

@media (max-width: 30rem) {
    .sheet { padding: 2rem 1.25rem 3rem; }
    h1 { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
