/* The profile page (views/profile.html). Leans on gateiron.css for the frame - nav, buttons,
   typography - and adds only the card layout, so the page reads as part of the marketing site
   it opens from rather than as a game screen. */
.profile-wrap { max-width: 720px; }

/* A THIRD OF THE SITE'S RUN-UP (Jeff, 2026-09-06: "a bit excess whitespace at the top... maybe to
   1/3rd of the current amount"). `.section-pad` is clamp(64px, 9vw, 118px) and belongs to every
   marketing section on the site, so it is not touched - this class is added beside it on the
   profile alone, where there is a great deal to fit and no hero to breathe around. The bottom
   padding keeps the site value: the shortfall a reader notices is above the fold, not below it. */
.profile-pad { padding-top: clamp(21px, 3vw, 39px); }

/* TOP, not centre. `.profile-card` centres its children, which was right when this card held two
   lines beside an avatar and is wrong now that it holds the birthday and the leaderboard choice
   too - the avatar drifted down to sit beside the date field, away from the name it belongs to. */
#identityCard { align-items: flex-start; flex-wrap: wrap; }
#identityCard .identity-text { flex: 1 1 0; }
#ageCard { flex: 1 0 100%; }
.profile-sub { margin-top: 1.1rem; }
.profile-sub .profile-field { margin-top: 0.35rem; }

.profile-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.1rem 1.3rem;
    margin-top: 1.1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}
.profile-block { display: block; }

.profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    flex: 0 0 auto;
}
.profile-name { margin: 0; font-weight: 700; font-size: 1.1rem; }
.profile-email { margin: 0.15rem 0 0 0; color: var(--text-muted); font-size: 0.95rem; }

.profile-heading {
    margin: 0 0 0.35rem 0;
    font-size: 1.02rem;
    font-weight: 700;
}
ul.profile-note { padding-left: 1.3rem; }
.username-ideas .btn { margin: 0 0.25rem 0.3rem 0; }
.profile-subheading { margin: 0.9rem 0 0.25rem 0; font-size: 0.92rem; font-weight: 700; }
.profile-note { margin: 0 0 0.7rem 0; color: var(--text-muted); font-size: 0.92rem; line-height: 1.5; }

.profile-field {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.profile-field input {
    font: inherit;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    min-width: 0;
}
#usernameInput { width: 16rem; max-width: 100%; }
.profile-field input:disabled { background: var(--surface-2); color: var(--text-muted); }

.profile-save { padding: 0.45rem 1.1rem; }
.profile-msg { font-size: 0.9rem; color: #a33; }
.profile-msg-ok { color: var(--ok); }

/* The danger card is visibly its own territory. */
.profile-danger { border-color: #d9b8b8; background: #fdf9f8; }
:root.gi-dark .profile-msg, :root[data-gi-theme="dark"] .profile-msg,
:root.gi-dark .site-blockers, :root[data-gi-theme="dark"] .site-blockers,
:root.gi-dark .profile-danger .profile-heading, :root[data-gi-theme="dark"] .profile-danger .profile-heading { color: #ec9a8f; }
:root.gi-dark .profile-danger, :root[data-gi-theme="dark"] .profile-danger { border-color: rgba(236, 154, 143, 0.4); background: var(--surface); }
.profile-danger .profile-heading { color: #8a2f2f; }
.profile-delete {
    background: #8a2f2f;
    border: 1px solid #8a2f2f;
    color: #fff;
    padding: 0.45rem 1.1rem;
    border-radius: 6px;
    cursor: pointer;
}
.profile-delete:disabled { opacity: 0.45; cursor: default; }
a.profile-delete { display: inline-block; text-decoration: none; }

/* /account/delete: one row per site, GateIron.com last. A site not used, or done, is grayed. */
.site-list { list-style: none; padding: 0; margin: 1rem 0; }
.site-row { border: 1px solid var(--border-color); border-radius: 8px; padding: 0.8rem 1rem; margin: 0 0 0.6rem; background: var(--surface); }
.site-row-off { opacity: 0.5; }
.site-row-here { border-color: var(--clay, #bb5a31); box-shadow: 0 0 0 2px var(--clay-light, #e6b9a4); }
.site-head { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.site-name { font-weight: 700; flex: 1 1 auto; }
.site-state { font-size: 0.88rem; color: var(--text-muted); }
.site-items, .site-blockers { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.site-fate { font-size: 0.85rem; color: var(--text-muted); }
.site-fate::before { content: '– '; }
.site-blockers { color: #8a2f2f; }
.site-detail { margin: 0.4rem 0 0; color: var(--text-muted); }
.site-confirm { margin: 0.6rem 0 0; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

/* Username-first identity block (2026-08-26). The chosen name leads in the game's typewriter
   face; the Google-supplied name and address follow as quiet read-only facts. */
.identity-text { min-width: 0; }
/* No extra gap under the username. It had 0.5em to set the chosen name apart from the
   Google-supplied one; Jeff, 2026-08-27: "I think I was wrong. Please remove that extra space and
   just allow normal space between those lines." The lines read as one block now, which is what
   they are. */
.profile-username-row { display: flex; align-items: baseline; gap: 0.6em; margin: 0; flex-wrap: wrap; }
.profile-username {
    font-family: "Courier New", Courier, "Nimbus Mono PS", "TeX Gyre Cursor", FreeMono,
                 "Liberation Mono", monospace;
    font-size: 1.35em;
    font-weight: 700;
    letter-spacing: 0.04em;
}
/* Both the control and the locked-date notice are deliberately the same quiet weight - the
   answer to "why can't I change it" appears exactly where the button would have been. */
.username-edit {
    font-size: 0.8em;
    color: var(--text-muted);
    background: none;
    border: 0;
    padding: 0;
    font-family: inherit;
}
.username-edit { cursor: pointer; text-decoration: underline dotted; }
.username-edit:hover { color: var(--text); }
.username-editor { margin: 0 0 0.6em; }

/* A label and its control on one line, with the labels sharing a column so the controls line up -
   two inputs of different widths under two labels of different lengths read as unrelated
   otherwise. The sign-in and sign-up forms are built from these. The name is left over from the
   classroom page it was written for, which is NotHangman.com's now. */
.class-field { display: flex; align-items: center; gap: 0.6em; margin: 0.25em 0; }
.class-field label { flex: 0 0 13.5em; }
.class-field select { flex: 0 1 22em; max-width: 100%; }

/* THE hidden ATTRIBUTE OUTRANKS LAYOUT. The username editor is markup-hidden and revealed by the
   "change" control, but `.profile-field { display: flex }` is a class selector and `[hidden]`'s
   UA rule is `display: none` at author-agnostic weight - so the flex won and the editor sat open
   under the name for everyone (Jeff, 2026-08-26: "there is a giant password change box... should
   be invisible unless the user has clicked the 'Change' button"). One rule fixes it everywhere
   rather than a display:none per hidden element, and it is the reason `hidden` can be trusted as
   the only mechanism on this page. */
[hidden] { display: none !important; }

/* The providers' doors: equal squares in a row under "Sign in with". Google's square is its own
   image; Facebook's and Microsoft's logos sit in squares drawn to match it (white, a 1px grey edge). */
.idp-label { margin: 0 0 0.45rem; text-align: center; font-weight: 600; color: var(--text-muted); }
.idp-doors { display: flex; justify-content: center; gap: 14px; }
.idp-door { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; line-height: 0; border-radius: 6px; }
.idp-door:focus-visible { outline: 2px solid var(--focus, #1a73e8); outline-offset: 3px; }
.google-door img { width: 48px; height: 48px; }
.idp-box { box-sizing: border-box; background: #fff; border: 1px solid #747775; border-radius: 5px; }
.idp-box:hover { background: #f3f3f3; }


/* A product's sign-in popup (?popup=1): no bar or footer, sized for a window about 480px wide. */
.gi-popup .profile-pad { padding: 18px 0 24px; }
.gi-popup .profile-wrap { padding: 0 18px; }
.gi-popup .section-label { display: none; }
.gi-popup h1.h2-size { font-size: 1.6rem; margin-bottom: 0.6rem; }
/* A 24-character username wraps inside its card. */
#approveAsk h1, .profile-heading[data-k="username"] { overflow-wrap: anywhere; }
.gi-popup .profile-card { padding: 16px 18px; }
.gi-popup .class-field { flex-wrap: wrap; gap: 0.25em 0.6em; }
.gi-popup .class-field label { flex: 1 0 100%; }
.gi-popup .class-field input { flex: 1 1 100%; }


/* The account chooser (views/choose.html). */
.account-choices { list-style: none; margin: 0 0 1rem; padding: 0; }
.account-choices li + li { margin-top: 0.5rem; }
.signin-page #another { min-height: 44px; }
.account-choice {
    display: flex; align-items: center; gap: 0.8rem; width: 100%; padding: 0.6rem 0.8rem;
    border: 1px solid var(--border-color); border-radius: 10px; background: var(--surface); text-align: left;
    font: inherit; color: var(--text); cursor: pointer;
}
.account-choice:hover { background: var(--surface-2); border-color: var(--clay-light); }
.account-choice:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.account-choice .avatar { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); font-weight: 700; overflow: hidden; }
.account-choice .avatar img { width: 40px; height: 40px; }
.account-choice-text { display: flex; flex-direction: column; line-height: 1.3; }
.account-choice-text span { font-size: 0.88rem; color: var(--text-muted); }
.account-choices li { display: flex; align-items: center; gap: 0.4rem; }
.account-choices li .account-choice { flex: 1 1 auto; width: auto; min-width: 0; }
.account-choice-text { min-width: 0; overflow-wrap: anywhere; }
.account-choice-remove { flex: none; width: 44px; height: 44px; min-height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.account-choice-remove span { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--text-muted); font-size: 1.15rem; line-height: 1; }
.account-choice-remove:hover span, .account-choice-remove:focus-visible span { background: var(--accent); color: var(--accent-on); }

/* After Create account: the one thing left to do, large. */
.signup-done { margin: 0.4rem 0; font-size: clamp(1.35rem, 3.6vw, 1.7rem); font-weight: 700; line-height: 1.3; color: var(--text); }

/* THE SIGN-IN PAGES (signin, choose, verify, verified): one column that fits a small phone's
   visible height, so every step's main button shows without scrolling. Inputs at 17px, since
   iPhones zoom into anything under 16px; every target at least 44px. */
.signin-page .profile-wrap { max-width: 460px; }
/* The sign-in pages carry no bar: the company's mark and name, small, above the title. */
.signin-brand { display: inline-flex; align-items: center; gap: 0.45rem; margin: 0 0 0.5rem; text-decoration: none; color: var(--text); font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 1.15rem; }
.signin-brand img { height: 24px; width: auto; display: block; }
.signin-or-link { text-align: center; margin: 0.2rem 0 0; }
#sentTo { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
/* On a phone too short for every way at once, when Facebook, Google or Microsoft was this browser's way in
   last time (signin.js): the provider buttons, and the other ways a tap away. */
@media (max-width: 480px) and (max-height: 540px) {
  #stepStart.last-google .or-rule, #stepStart.last-google #passwordForm, #stepStart.last-google #toPasswordless { display: none; }
}
/* With room for everything (Jeff, 2026-10-16), every way shows and the link has nothing to open. */
@media (min-width: 481px), (min-height: 541px) { #otherWaysRow { display: none; } }
.signin-card { padding: 1.1rem 1.2rem 1rem; }
.signin-card .google-row { margin: 0.1rem 0 0.3rem; }
.or-rule { display: flex; align-items: center; gap: 0.9rem; margin: 0.8rem 0 0.7rem; color: var(--text-muted); }
.or-rule::before, .or-rule::after { content: ""; flex: 1; border-top: 2px solid var(--border-strong); }
.or-rule span { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.08em; }
.field-stack { display: flex; flex-direction: column; gap: 0.2rem; margin: 0 0 0.75rem; }
.field-stack label { margin: 0; font-weight: 600; font-size: 1rem; line-height: 1.3; }
.field-stack label .field-hint { display: inline; margin-left: 0.3em; font-size: 0.85rem; }
.signin-card .required-note { margin: 0 0 0.4rem; }
.signin-card .class-input { width: 100%; font-size: 17px; padding: 0.55em 0.8em; min-height: 46px; box-sizing: border-box; }
.signin-card .code-input { font-size: 22px; letter-spacing: 0.3em; text-align: center; }
.field-actions { margin: 0.2rem 0 0.3rem; }
.btn-wide { width: 100%; justify-content: center; min-height: 46px; font-size: 1.05rem; }
.field-alt { margin: 0.4rem 0 0; text-align: center; }
.signin-card .linkish { background: none; border: 0; padding: 0.4rem; color: var(--accent); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; min-height: 44px; }
.who-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0 0 0.6rem; font-size: 1.05rem; }
.who-line .linkish { padding: 0 0.3rem; min-height: 0; }
.who-note { margin: 0 0 0.7rem; font-size: 1.05rem; }
@media (max-width: 480px) {
  .signin-page { font-size: 17px; }
  .signin-page .wrap { padding: 0 12px; }
  .signin-page .profile-pad { padding-top: 12px; padding-bottom: 16px; }
  .signin-brand { margin-bottom: 0.25rem; }
  .signin-page h1.h2-size { font-size: 1.5rem; margin-bottom: 0.4rem; }
  .signin-card { padding: 0.8rem 0.9rem 0.5rem; margin-top: 0.4rem; }
  .signin-card .or-rule { margin: 0.5rem 0 0.4rem; }
  .signin-card .field-stack { margin-bottom: 0.55rem; }
  .signin-card .field-alt { margin-top: 0.1rem; }
}
/* A short screen (a small phone with the browser's bars, a landscape phone, a small window). */
@media (max-height: 720px) {
  .signin-page .profile-pad { padding-top: 8px; }
  .signin-page h1.h2-size { font-size: 1.35rem; margin-bottom: 0.3rem; }
  .signin-card .field-stack { margin-bottom: 0.45rem; }
  .signin-card .class-input { padding: 0.45em 0.75em; min-height: 44px; }
  .signin-page .btn-wide { min-height: 44px; }
  .signin-card .or-rule { margin: 0.4rem 0 0.3rem; }
  .signin-card .or-rule span { font-size: 1.05rem; }
}
/* A landscape phone: two columns, so the form fits beside itself rather than below the fold. */
@media (max-height: 500px) and (min-width: 560px) {
  .signin-page .profile-wrap { max-width: 760px; }
  .signin-brand { margin-bottom: 0; }
  #stepStart { display: grid; grid-template-columns: 1fr auto 1fr; column-gap: 1rem; align-items: center; }
  #stepStart .google-row { grid-column: 1; grid-row: 1 / span 2; }
  #stepStart .or-rule { grid-column: 2; grid-row: 1 / span 2; flex-direction: column; align-self: stretch; margin: 0; }
  #stepStart .or-rule::before, #stepStart .or-rule::after { border-top: 0; border-left: 2px solid var(--border-strong); }
  #stepStart #passwordForm { grid-column: 3; grid-row: 1; }
  #stepStart .field-alt { grid-column: 3; grid-row: 2; }
  #createForm { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1rem; }
  #createForm .required-note, #createForm .field-actions, #createForm .field-error { grid-column: 1 / -1; }
  .signin-page h1.h2-size { display: inline-block; margin: 0 0 0.3rem 1rem; vertical-align: middle; }
  .signin-card { margin-top: 0.2rem; }
}
/* A narrow phone: margins give way first, then long names and addresses wrap rather than run past
   the card (function over form, Jeff 2026-10-06). */
@media (max-width: 480px) {
  .profile-pad .wrap { padding: 0 12px; }
  .profile-card { padding: 0.9rem 0.8rem; gap: 0.7rem; }
  .profile-avatar { width: 44px; height: 44px; }
  .profile-username { font-size: clamp(1.05em, 5.4vw, 1.35em); }
}
.identity-text .profile-username, .identity-text .profile-name, .identity-text .profile-email { overflow-wrap: anywhere; }

.profile-check { display: inline-flex; align-items: center; gap: 0.5rem; }

/* Children's accounts (src/children.js): the birthday's two selects side by side; a parent's child cards. */
.field-label { font-weight: 600; }
.birth-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.birth-row select { flex: 1 1 8rem; min-width: 0; }
.profile-check { align-items: flex-start; }
.profile-check input { margin-top: 0.25em; flex: none; }
.email-list { list-style: none; margin: 0 0 0.6rem; padding: 0; }
.email-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; padding: 0.3rem 0; overflow-wrap: anywhere; }
.family-child .profile-field label { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.family-child .profile-delete { margin-top: 0.6rem; }
.score-choice { margin-bottom: 0.7rem; }
/* A site row is text that wraps: the name, its dates, then the settings button. */
.family-child [data-k="products"] .profile-field { display: block; }
.family-child [data-k="products"] .profile-field + .profile-field { margin-top: 0.6rem; }
.family-child [data-k="products"] .profile-field .btn { margin: 0.35rem 0 0 0; }
.family-child .score-choice label { flex-wrap: nowrap; align-items: flex-start; }
.pause-choice { margin-bottom: 0.7rem; }
.pause-choice select { width: auto; max-width: 100%; }
.barred-why .why-link { background: none; border: 0; padding: 0; margin: 0; color: var(--accent); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
[data-why=""] .barred-why { display: none; }
