/* Shared styles for every application journey (business, personal, tiny home, home loan).
   Everything is scoped under .mmm-form (FormShell), so other pages such as /continue keep their own look.
   Global rather than component-scoped on purpose: scoped CSS never reached the inputs rendered by
   Blazor's InputText, InputSelect, InputNumber and InputDate, or elements inside child components. */

/* The brand typeface (brand colours PDF): Poppins, bundled here (open font licence) because the
   form's security policy only loads fonts from its own site. */
@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url("fonts/Poppins-Regular.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url("fonts/Poppins-Medium.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url("fonts/Poppins-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url("fonts/Poppins-Bold.ttf") format("truetype"); }

.mmm-form {
    overflow-anchor: none;   /* a new step starts at the top: no browser scroll anchoring (John, 1 Oct 2026) */
    max-width: 820px;
    margin: 24px auto;
    font-family: 'Poppins', 'Segoe UI', Roboto, system-ui, sans-serif;
    color: #1C1C1C;
}

/* Design pass 1 Oct 2026 (docs/FORM_DESIGN_LOG.md), lined up with matchmemoney.co.nz: a white header with the
   logo, near-black headings (#1C1C1C, Poppins 600), lime (#8ACF3A) for progress and actions, green (#4B8C1E)
   for links. No dark reverse block (John: it suits the website, not a form). */
.mmm-form .brandbar {
    background: #fff;
    border: 1px solid #eee;
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
    padding: 16px 28px 0;
}
.mmm-form .brandbar img { display: block; height: 42px; width: auto; }

.mmm-form .hd {
    background: #fff;
    color: #1C1C1C;
    border: 1px solid #eee;
    border-top: 0;
    border-bottom: 3px solid #8ACF3A;
    padding: 14px 28px 20px;
}

.mmm-form .hd h1 { margin: 0 0 4px; font-size: 1.5rem; font-weight: 600; color: #1C1C1C; }
.mmm-form .hd p { margin: 0 0 14px; color: #4b5563; font-size: .95rem; }

.mmm-form .bar { height: 6px; background: #EEF2E6; border-radius: 3px; overflow: hidden; }
.mmm-form .fill { height: 100%; background: #8ACF3A; transition: width .3s ease; }
.mmm-form .stepinfo { margin-top: 8px; font-size: .85rem; color: #4b5563; }
.mmm-form .stepnext { font-size: .82rem; color: #6b7280; margin-top: 2px; }
.mmm-form .stephelp { font-size: .82rem; color: #6b7280; margin-top: 2px; }
.mmm-form .stephelp a { color: inherit; }
.mmm-form .hint.secure { margin-top: -4px; }

.mmm-form .card {
    background: #fff;
    border: 1px solid #eee;
    border-top: none;
    padding: 28px;
}

.mmm-form .card h2 { color: #1C1C1C; font-weight: 600; font-size: 1.2rem; margin: 0 0 20px; }
.mmm-form .card h2.sub {
    font-size: 1.05rem;
    margin: 28px 0 6px;
    padding-top: 22px;
    border-top: 1px solid #eee;
}
.mmm-form .hint { color: #6b7280; font-size: .85rem; margin: 0 0 18px; }

.mmm-form .money { display: flex; align-items: stretch; }
.mmm-form .money .prefix {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: #f4fbe9;
    border: 2px solid #e5e7eb;
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: #2A4210;
    font-weight: 600;
}
.mmm-form .money .ctl { border-radius: 0 8px 8px 0; flex: 1; width: 100%; }

.mmm-form .list-head { display: flex; align-items: center; justify-content: space-between; }
.mmm-form .btn.sm { padding: 7px 14px; font-size: .85rem; }
.mmm-form .empty { color: #9ca3af; font-size: .9rem; margin: 4px 0 14px; }

.mmm-form .item { margin-bottom: 10px; }
.mmm-form .item-grid { display: grid; gap: 10px; align-items: start; }
.mmm-form .item-grid.assets { grid-template-columns: 1fr 1.3fr 0.9fr auto; }
.mmm-form .item-grid.liabilities { grid-template-columns: 1fr 1.1fr 0.9fr 0.9fr auto; }
.mmm-form .item-grid .ctl { padding: 9px 11px; }
/* let inputs shrink inside the grid instead of forcing horizontal overflow */
.mmm-form .item-grid .ctl, .mmm-form .item-grid .money { min-width: 0; }
.mmm-form .item-grid .money .ctl { width: 100%; }

.mmm-form .rm {
    align-self: stretch;
    border: none;
    background: #fef2f2;
    color: #dc2626;
    border-radius: 8px;
    width: 38px;
    cursor: pointer;
    font-size: .9rem;
}
.mmm-form .rm:hover { background: #fee2e2; }

.mmm-form .totals {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.mmm-form .tot {
    flex: 1;
    min-width: 150px;
    background: #f9fafb;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mmm-form .tot span { color: #6b7280; font-size: .8rem; }
.mmm-form .tot strong { color: #2A4210; font-size: 1.1rem; }
.mmm-form .tot.net { background: #f4fbe9; border-color: #8ACF3A; }

@media (max-width: 640px) {
    /* Part 2 (8 Oct 2026): tighter tap buttons on phones, so short groups (Weekly / Fortnightly / Monthly) fit on one line. */
    .mmm-form .seg-wrap { gap: 8px; }
    .mmm-form .seg-wrap .opt { padding: 10px 14px; }
    /* two even columns on a phone: Type and Description or Lender, then the amounts, then remove */
    .mmm-form .item-grid.assets, .mmm-form .item-grid.liabilities { grid-template-columns: 1fr 1fr; }
    .mmm-form .item-grid .rm { height: 40px; }
}

.mmm-form .person {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 12px;
    background: #fcfdfb;
}
.mmm-form .person .row:last-child { margin-bottom: 0; }
.mmm-form .person-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mmm-form .person-title { color: #2A4210; font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }

.mmm-form .fg.center { justify-content: flex-end; }
.mmm-form .check { display: flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 500 !important; color: #1C1C1C !important; }
.mmm-form .check input[type=checkbox] { width: 18px; height: 18px; accent-color: #8ACF3A; cursor: pointer; }
.mmm-form .check span { font-size: .9rem; }

.mmm-form .choice { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.mmm-form .tile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
    padding: 16px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
}
.mmm-form .tile:hover { border-color: #8ACF3A; }
.mmm-form .tile.on { border-color: #8ACF3A; background: #f4fbe9; }
.mmm-form .tile strong { color: #2A4210; font-size: .98rem; }
.mmm-form .tile span { color: #6b7280; font-size: .82rem; }
.mmm-form a.tile { text-decoration: none; }
.mmm-form .safe-toggle { display: block; margin-right: auto; text-align: left; background: none; border: 0; padding: 4px 0; color: #2A4210; font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; text-decoration: underline; }
.mmm-form .safe-panel { margin: 6px 0 14px; padding: 14px 16px; border-left: 4px solid #8ACF3A; background: #f4fbe9; border-radius: 8px; font-size: .88rem; }
.mmm-form .safe-panel p { margin: 0 0 8px; }
.mmm-form .prefer-upload { margin: 10px 0 8px; }
.mmm-form .safe-note { margin: 12px 0 14px; padding: 12px 14px; background: #F3F4F6; border-radius: 8px; font-size: .88rem; line-height: 1.5; }
.mmm-form .safe-note a { color: #2A4210; font-weight: 600; }
.mmm-form .safe-panel .safe-links { margin: 10px 0 0; }
.mmm-form .safe-panel a { color: #2A4210; font-weight: 600; }

.mmm-form .notice {
    background: #FFF4D7;
    border: 1px solid #f0d98a;
    color: #7a5c00;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: .88rem;
    margin-bottom: 14px;
}

.mmm-form .filebtn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border: 2px dashed #8ACF3A;
    border-radius: 10px;
    background: #f4fbe9;
    color: #2A4210;
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    margin-bottom: 12px;
}
.mmm-form .filebtn:hover { background: #eaf6d8; }
.mmm-form .hidden-file { display: none; }

.mmm-form .filerow {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 13px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #fcfdfb;
}
.mmm-form .filerow .fn { flex: 1; color: #1C1C1C; font-size: .9rem; word-break: break-all; }
.mmm-form .filerow .fsz { color: #6b7280; font-size: .8rem; white-space: nowrap; }

@media (max-width: 640px) {
    .mmm-form .choice { grid-template-columns: 1fr; }
}

.mmm-form .review { margin-bottom: 18px; }
.mmm-form .review-hd { display: flex; align-items: baseline; justify-content: space-between; }
.mmm-form .link {
    background: none;
    border: none;
    color: #8ACF3A;
    font-weight: 600;
    font-size: .85rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}
.mmm-form .link:hover { color: #2A4210; }

.mmm-form .review dl { margin: 4px 0 0; }
.mmm-form .review dl > div {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid #f2f2f2;
}
.mmm-form .review dt { color: #6b7280; font-size: .88rem; }
.mmm-form .review dd { margin: 0; color: #1C1C1C; font-size: .9rem; word-break: break-word; }

.mmm-form .decl {
    align-items: flex-start;
    gap: 11px;
    margin: 10px 0 4px;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}
.mmm-form .decl input[type=checkbox] { margin-top: 2px; flex: 0 0 auto; }
.mmm-form .decl span { font-size: .88rem; line-height: 1.5; }

@media (max-width: 640px) {
    .mmm-form .review dl > div { grid-template-columns: 1fr; gap: 2px; }
}

.mmm-form .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

/* min-width 0 lets a field shrink to its grid cell; otherwise a long dropdown option widens the cell past the card on a phone */
.mmm-form .fg { display: flex; flex-direction: column; min-width: 0; }
.mmm-form .fg label { color: #2A4210; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.mmm-form .req { color: #FF7E67; }

.mmm-form .ctl {
    padding: 11px 13px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: .95rem;
}

.mmm-form .ctl:focus {
    outline: none;
    border-color: #8ACF3A;
    box-shadow: 0 0 0 3px rgba(138,207,58,.15);
}

.mmm-form .nzbn { display: flex; gap: 10px; }
.mmm-form .nzbn .ctl { flex: 1; }
.mmm-form .fg small { color: #6b7280; font-size: .8rem; margin-top: 5px; }

/* Company lookup (Step 1) */
.mmm-form .lookup-msg { margin-top: 10px; padding: 10px 14px; border-radius: 8px; font-size: .88rem; background: #f3f4f6; color: #374151; }
.mmm-form .lookup-msg.ok { background: #f4fbe9; border: 1px solid #8ACF3A; color: #2A4210; }
.mmm-form .lookup-msg.info { background: #fffaf0; border: 1px solid #ffe1b3; color: #92500a; }

.mmm-form .hits { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.mmm-form .hit {
    display: flex; flex-direction: column; gap: 4px;
    text-align: left; width: 100%;
    padding: 12px 14px;
    border: 2px solid #e5e7eb; border-radius: 8px;
    background: #fff; cursor: pointer;
    transition: border-color .12s, background .12s;
}
.mmm-form .hit:hover { border-color: #8ACF3A; background: #fafef2; }
.mmm-form .hit-name { font-weight: 600; color: #1C1C1C; }
.mmm-form .hit-meta { display: flex; align-items: center; gap: 10px; font-size: .8rem; }
.mmm-form .hit-nzbn { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: #6b7280; }
.mmm-form .hit-status { padding: 2px 8px; border-radius: 999px; font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; }
.mmm-form .hit-status.ok { background: #e7f6d3; color: #2A4210; }
.mmm-form .hit-status.warn { background: #fef3c7; color: #92500a; }
.mmm-form .hit-status.bad { background: #fee2e2; color: #b91c1c; }
.mmm-form .hit-status.muted { background: #eef1f4; color: #4b5563; }
.mmm-form .hit-addr { font-size: .8rem; color: #6b7280; }

.mmm-form .seg { display: flex; gap: 10px; }
.mmm-form .opt {
    padding: 11px 22px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-weight: 600;
    color: #2A4210;
}
.mmm-form .opt.on { border-color: #8ACF3A; background: #f4fbe9; }
/* The ID step (23 Oct 2026): the three IDs are the main choice; "later" is a smaller link below them. */
.mmm-form .opt.id-primary { border-color: #8ACF3A; }
.mmm-form .id-quick { margin: 0 0 8px; }
.mmm-form .id-later-link { display: inline-block; margin: 14px 0 4px; padding: 6px 0; background: none; border: 0; font: inherit; font-size: .9rem; color: #4b5563; text-decoration: underline; cursor: pointer; }
.mmm-form .tip.id-later .link { display: block; margin-top: 8px; }

.mmm-form .nav {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #eee;
    border-top: none;
    border-radius: 0 0 16px 16px;
    padding: 20px 28px;
}
.mmm-form .spacer { flex: 1; }
/* Part 2 item 11: "Save and finish later" sits beside Continue; on a phone it takes its own line under the two. */
.mmm-form .nav { flex-wrap: wrap; gap: 10px; }
@media (max-width: 600px) { .mmm-form .nav .save-later { order: 3; width: 100%; } }

/* The website's buttons: pills, Poppins 600, lime with near-black text (also easier to read than white on lime). */
.mmm-form .btn {
    padding: 12px 28px;
    border-radius: 99px;
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: 2px solid transparent;
}
.mmm-form .btn.primary { background: #8ACF3A; border-color: #8ACF3A; color: #1C1C1C; }
.mmm-form .btn.primary:hover { background: #7BBE2F; border-color: #7BBE2F; }
.mmm-form .btn.primary:disabled { opacity: .6; cursor: default; }
.mmm-form .btn.ghost { background: #fff; color: #1C1C1C; border-color: #8ACF3A; }

.mmm-form .placeholder { color: #6b7280; }
.mmm-form .validation-message { color: #dc2626; font-size: .8rem; margin-top: 4px; }

.mmm-form .result { margin: 16px 0; padding: 14px 18px; border-radius: 10px; font-size: .95rem; }
.mmm-form .result.ok { background: #f4fbe9; border: 1px solid #8ACF3A; color: #2A4210; }
.mmm-form .result.err { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.mmm-form .docsummary { margin-top: 8px; font-size: .85rem; opacity: .85; }
.mmm-form .cashflow { background: #fafdf4; border: 1px solid #e7f0d8; border-radius: 10px; padding: 16px 18px; margin: 0 0 22px; }
.mmm-form .cashflow .sub { margin-top: 0; }
.mmm-form .opt-tag { color: #6b7280; font-weight: 400; font-size: .8rem; }

/* A pair whose boxes line up even when one label wraps (Craig, 2 Oct 2026): each field shares the row's four tracks
   (label, box, hint, error). */
.mmm-form .row.align { grid-template-rows: auto auto auto auto; row-gap: 0; }
.mmm-form .row.align { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.mmm-form .row.align > .fg { display: grid; grid-row: span 4; grid-template-rows: subgrid; grid-template-columns: minmax(0, 1fr); align-content: start; align-items: start; }
/* Labels start level at the top (Craig, 2 Oct 2026); the boxes still line up under the longer one. */
.mmm-form .row.align > .fg > label { align-self: start; }
.mmm-form .row > .fg.full { grid-column: 1 / -1; }
/* Part 2 (8 Oct 2026): a question answered by 5 or more tap buttons takes the whole row, so the buttons sit on one or two
   lines instead of stacking down half the page; its partner field moves to the row below. Short groups stay side by side. */
.mmm-form .row > .fg:has(.seg-wrap .opt:nth-child(5)) { grid-column: 1 / -1; }

@media (max-width: 640px) {
    .mmm-form .row { grid-template-columns: 1fr; }
    .mmm-form .row.align { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: 18px; }
    .mmm-form .row.align > .fg { display: flex; grid-row: auto; align-items: stretch; }
    .mmm-form .row.align > .fg > label { align-self: auto; }
}

/* Front door (AB#430): tiles are links, two to a row, one on a very narrow phone. */
.mmm-form .card.last { border-radius: 0 0 16px 16px; }
.mmm-form .doors { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 22px; }
.mmm-form .door {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 18px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    color: #1C1C1C;
    text-decoration: none;
    transition: border-color .12s, background .12s;
}
.mmm-form .door:hover, .mmm-form .door:focus-visible { border-color: #8ACF3A; background: #f4fbe9; outline: none; }
.mmm-form .door-icon { width: 40px; height: 40px; }
.mmm-form .door strong { color: #1C1C1C; font-size: 1.05rem; font-weight: 600; }
.mmm-form .door-blurb { color: #4b5563; font-size: .85rem; line-height: 1.4; }
.mmm-form .door-time { margin-top: auto; padding-top: 6px; color: #2A4210; font-size: .78rem; font-weight: 600; }
.mmm-form .tip.handy { margin: 0 0 18px; }
.mmm-form .tip.handy ul { margin: 6px 0 6px; padding-left: 20px; }
.mmm-form .tip.handy li { margin: 0 0 3px; }
.mmm-form .tip.handy .handy-note { display: block; font-size: .85rem; color: #4b5563; }
/* Folded on phones (Craig, 7 Oct 2026): the summary is the tap target under 768px; from 768px the panel is open and
   the summary is hidden, so it reads as before. */
.mmm-form .tip.handy .handy-toggle { cursor: pointer; font-weight: 600; color: #2A4210; list-style: none; padding: 2px 0; }
.mmm-form .tip.handy .handy-toggle::-webkit-details-marker { display: none; }
.mmm-form .tip.handy .handy-toggle::after { content: " ▸"; }
.mmm-form .tip.handy[open] .handy-toggle::after { content: " ▾"; }
.mmm-form .tip.handy .handy-toggle:focus-visible { outline: 2px solid #8ACF3A; outline-offset: 2px; border-radius: 4px; }
.mmm-form .tip.handy .handy-lead { display: none; }
@media (min-width: 768px) {
    .mmm-form .tip.handy .handy-toggle { display: none; }
    .mmm-form .tip.handy .handy-lead { display: inline; }
}
/* Page-1 fix 2 (24 Oct 2026): folded into one tappable line on every screen width. */
.mmm-form .tip.handy.folded .handy-toggle { display: block; }
.mmm-form .tip.handy.folded .handy-lead { display: none; }
.mmm-form .reassure { list-style: none; padding: 16px 0 0; margin: 0; border-top: 1px solid #eee; display: flex; flex-direction: column; gap: 6px; }
.mmm-form .reassure li { color: #4b5563; font-size: .88rem; padding-left: 22px; position: relative; }
.mmm-form .reassure li::before { content: "✓"; position: absolute; left: 0; color: #8ACF3A; font-weight: 700; }
.mmm-form .reassure a, .mmm-form .card a[href^="tel:"] { color: #2A4210; font-weight: 600; }
.mmm-form .back-link { margin: 8px 0 0; font-size: .9rem; }
.mmm-form .back-link a { color: #2A4210; }

@media (max-width: 359px) {
    .mmm-form .doors { grid-template-columns: 1fr; }
}

/* Phones: a 16px side gutter instead of 28px, so fields and tiles get the width. */
@media (max-width: 640px) {
    .mmm-form { margin: 0 auto 16px; }
    .mmm-form .brandbar { padding: 12px 16px 0; border-radius: 0; }
    .mmm-form .brandbar img { height: 34px; }
    .mmm-form .hd { padding: 10px 16px 16px; }
    .mmm-form .hd h1 { font-size: 1.3rem; }
    .mmm-form .card { padding: 20px 16px; }
    .mmm-form .card.last { border-radius: 0; }
    .mmm-form .nav { padding: 16px; border-radius: 0; }
    .mmm-form .doors { gap: 10px; }
    .mmm-form .door { padding: 14px 12px; }
    .mmm-form .door-blurb { font-size: .8rem; }
}

/* iPhone Safari zooms the page when a box with text under 16px is tapped, and does not zoom back.
   16px on phones stops that. Android is unaffected either way. */
@media (max-width: 640px) {
    .mmm-form .ctl, .mmm-form select.ctl, .mmm-form textarea.ctl { font-size: 16px; }
}

/* Instant feedback (AB#431): a green tick once a box is right, a red edge while it is wrong.
   Blazor marks inputs "modified valid" / "invalid" as the customer leaves them. */
.mmm-form .ctl.invalid { border-color: #dc2626; outline: none; }
.mmm-form .ctl.modified.valid { border-color: #8ACF3A; outline: none; }
.mmm-form input.ctl.modified.valid:not([type=date]) {
    padding-right: 34px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%232A4210' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3 8.5l3.2 3L13 4.5'/%3E%3C/svg%3E") no-repeat right 11px center / 16px 16px;
}
.mmm-form .validation-message { color: #b91c1c; }

/* The list at the top of a step when Continue finds things to fix. */
.mmm-form .error-summary {
    background: #fef2f2; border: 2px solid #dc2626; border-radius: 10px;
    padding: 14px 18px; margin: 0 0 16px; color: #1C1C1C; outline: none;
}
.mmm-form .error-summary strong { color: #b91c1c; }
.mmm-form .error-summary ul { margin: 8px 0 0; padding-left: 20px; }
.mmm-form .error-summary a { color: #b91c1c; text-decoration: underline; }

/* Date of birth: three boxes, day and month narrow, year wider. */
.mmm-form .dob { display: flex; gap: 10px; }
/* Day / Month / Year sit under their boxes (Craig, 2 Oct 2026), so the boxes line up with the field beside them. */
.mmm-form .dob-part { display: flex; flex-direction: column-reverse; font-weight: 400 !important; margin: 0 !important; }
.mmm-form .dob-part span { font-size: .78rem; color: #6b7280; margin-top: 4px; }
.mmm-form .dob-part .ctl { width: 64px; text-align: center; }
.mmm-form .dob-year .ctl { width: 88px; }

/* Email typo suggestion. */
.mmm-form .suggest { margin-top: 6px; font-size: .85rem; color: #2A4210; background: #f4fbe9; border-radius: 8px; padding: 8px 12px; }
.mmm-form .suggest .link { margin-left: 6px; color: #2A4210; }
/* A specific date problem ("That date doesn't exist") replaces the general "please enter" message. */
.mmm-form .dob-problem ~ .validation-message { display: none; }
/* The date boxes are too narrow for the tick: a green border says it instead. */
.mmm-form .dob input.ctl.modified.valid { padding-right: 8px; background-image: none; }
.mmm-form .dob .ctl { padding-left: 8px; padding-right: 8px; }

/* AB#431: "Find your address" search above the address fields. Not scoped to .mmm-form: the
   business /continue page uses its own scoped styles, which never reach a child component. */
.addr-search { position: relative; display: flex; flex-direction: column; min-width: 0; margin-bottom: 14px; }
.addr-search label { color: #2A4210; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.addr-search .ctl { width: 100%; padding: 11px 13px; border: 2px solid #e5e7eb; border-radius: 8px; font-size: .95rem; font-family: inherit; }
.addr-search .ctl:focus { outline: none; border-color: #8ACF3A; box-shadow: 0 0 0 3px rgba(138,207,58,.15); }
.addr-list { list-style: none; margin: 4px 0 0; padding: 4px; border: 2px solid #8ACF3A; border-radius: 10px; background: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.addr-list button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 8px; font: inherit; font-size: .92rem; color: #1C1C1C; cursor: pointer; }
.addr-list button:hover, .addr-list button:focus { background: #f4fbe9; outline: none; }
.addr-by-google { font-size: .72rem; color: #6b7280; text-align: right; padding: 4px 8px 2px; }
.addr-note { margin-top: 6px; font-size: .85rem; color: #6b7280; }
.addr-note.ok { color: #2A4210; }

/* AB#432: the thank-you page's "what happens next". */
.mmm-form .next-steps { margin: 0 0 18px; padding-left: 22px; }
.mmm-form .next-steps li { margin-bottom: 8px; line-height: 1.5; }
.mmm-form .notice a { color: #7a5c00; font-weight: 600; }

/* The Terms and Privacy agreements (ConsentBlock): the full wording, readable inline. */
.consent { margin-top: 18px; }
.consent .check.decl { margin-top: 10px; }
.mmm-form .safe-panel.legal ol { margin: 6px 0 10px; padding-left: 22px; }
.mmm-form .safe-panel.legal li { margin-bottom: 6px; line-height: 1.5; }
/* Consent comes first, on step 1 (Craig, 30 Sep 2026). */
.mmm-form .consent-first { border-top: 4px solid #8ACF3A; }
.mmm-form .consent-first .consent { margin-top: 8px; }
.mmm-form .consent-first .why { background: #f4fbe9; border-left: 4px solid #8ACF3A; border-radius: 8px; padding: 10px 14px; font-size: .9rem; }

/* Loan purposes: tap as many as apply (Craig, 30 Sep 2026). */
.mmm-form .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mmm-form .chip { border: 2px solid #e5e7eb; background: #fff; color: #1C1C1C; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: .9rem; cursor: pointer; }
.mmm-form .chip:hover { border-color: #8ACF3A; }
.mmm-form .chip.on { border-color: #8ACF3A; background: #f4fbe9; color: #2A4210; font-weight: 600; }
.mmm-form .tip { margin: 4px 0 16px; padding: 12px 14px; background: #FFF4D7; border-left: 4px solid #8ACF3A; border-radius: 8px; font-size: .9rem; line-height: 1.5; }
.mmm-form .tip .link { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: #2A4210; text-decoration: underline; cursor: pointer; }
.mmm-form .tip.evidence p { margin: 6px 0; }
.mmm-form .tip.evidence ul { margin: 6px 0; padding-left: 20px; }
.mmm-form .tip.evidence li { margin: 4px 0; }

/* "What are you uploading?" then the files (UploadPicker). */
/* minmax(0, 1fr): a long option ("Photo ID (driver licence or passport)") widened the column past a phone's edge (7 Oct 2026). */
.mmm-form .upload-picker { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 4px 0 14px; }
.mmm-form .upload-picker .lbl { font-weight: 600; color: #2A4210; font-size: .9rem; }
.mmm-form .upload-picker select.ctl { max-width: 420px; }
.mmm-form .tile.off { opacity: .55; cursor: not-allowed; }
.mmm-form .tile.off:hover { border-color: #e5e7eb; }

/* Shown under the buttons while a slow step saves (StepNav SubmittingHint). */
.mmm-form .saving-hint { text-align: right; margin: 8px 0 0; }

/* How a document has to be sent, under the upload tile (DocumentGuide). */
.mmm-form .upload-how { font-size: .85rem; color: #2A4210; background: #F4FBE9; border-radius: 8px; padding: 8px 12px; margin: 0; }

/* What the customer has already sent, on the page after submit. */
.mmm-form ul.received { list-style: none; padding: 0; margin: 0 0 14px; }
.mmm-form ul.received li { padding: 6px 0; border-bottom: 1px solid #E3E6DA; font-size: .92rem; }
.mmm-form ul.received .when { color: #6b7280; font-size: .82rem; margin-left: 6px; }

/* What "connecting your bank" means (John, 1 Oct 2026), and the locked T&C / Privacy ticks (Craig, 1 Oct 2026). */
.mmm-form .connect-means { margin: 0 0 14px; font-size: .9rem; line-height: 1.5; color: #1C1C1C; }
/* The locked tick is now a clickable row that OPENS its disclosure (Craig, 6 Oct 2026) — never a dead box. */
.mmm-form .check.decl.locked { cursor: pointer; color: #2A4210 !important; }
.mmm-form .check.decl.locked:hover { color: #1C1C1C !important; }
.mmm-form .check.decl.locked .box { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; border: 2px solid #b8c4a0; border-radius: 4px; background: #fff; }
.mmm-form .check.decl.locked:hover .box { border-color: #8ACF3A; }
.mmm-form .check.decl.locked:focus-visible { outline: 2px solid #8ACF3A; outline-offset: 2px; border-radius: 4px; }
.mmm-form .lock-hint { margin: -4px 0 12px; }
/* The plain-English lead-in on the consent block (6 Oct 2026). */
.mmm-form .consent-intro { margin: 0 0 12px; font-size: .9rem; line-height: 1.5; color: #1C1C1C; }
/* A field (and its control) still to fix shows red (Craig, 6 Oct 2026); it clears the moment it's fixed. */
.mmm-form .fg.invalid > label { color: #c0392b; }
.mmm-form .fg.invalid input, .mmm-form .fg.invalid select, .mmm-form .fg.invalid textarea, .mmm-form .fg.invalid .ctl { border-color: #c0392b !important; box-shadow: 0 0 0 1px #c0392b; }
.mmm-form .check.decl.invalid { color: #c0392b !important; }
.mmm-form .check.decl.locked.invalid .box { border-color: #c0392b; background: #fdecea; }
.mmm-form .safe-toggle.must-open { margin-top: 6px; }

/* Security review H2: the honeypot field, never seen by people (off screen, not display:none, which some bots skip). */
.mmm-form .hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.mmm-form .safe-panel.open { margin: 4px 0 14px; }
.mmm-form .safe-panel .safe-heading { margin: 0 0 10px; color: #1C1C1C; }

/* Matthew, 1 Oct 2026: the "choose Yes for Work and Income" line for beneficiaries, under the bank step. */
.winz { background: #FFF4D7; border-left: 4px solid #E8B03A; padding: 10px 14px; border-radius: 6px; margin: 10px 0 14px; line-height: 1.5; }

/* Business form, directors and guarantors (AB#434): one box per person. */
.mmm-form .party { border: 1px solid #e5e7eb; border-radius: 10px; padding: 14px 16px 10px; margin: 0 0 14px; }
.mmm-form .party .check { margin: 0 0 14px; }
.mmm-form .party > .link { margin: 4px 0 6px; }

/* "Your ID" (5 Oct 2026): four choices wrap on a phone; the after-submit box sits apart from the lists. */
.mmm-form .seg-wrap { flex-wrap: wrap; }
.mmm-form .id-capture .small { font-size: 0.85em; }
.mmm-form .id-after { border: 1px solid #e3e0f0; border-radius: 8px; padding: 12px 16px; margin: 16px 0; }

/* Part 2 (8 Oct 2026): breathing room where a question sat tight under the hint or buttons above it (run-through nits). */
.mmm-form .gap-top { margin-top: 14px; }

/* "Back to matchmemoney.co.nz" on the thank-you pages (Andrew, 8 Oct 2026). */
.mmm-form .back-home { margin: 16px 0 0; font-weight: 600; }
.mmm-form .back-home a { color: #2A4210; }
