:root {
  --bg: #FFFFFF;
  --ink: #1A1A1A;
  --text: #1A1A1A;
  --mute: #6B6B6B;
  --line: #E2E2E2;
  --soft: #F6F7F7;
  --you: #BF2150;
  --you-hover: #A51A44;
  --font-body: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --size-h3: 26px;
  --size-h3-phone: 21px;
  --size-body: 18px;
  --size-body-phone: 16px;
  --size-small: 14px;
  --weight-heading: 700;
  --leading-h3: 1.5;
  --leading-body: 1.85;
  --leading-small: 1.7;
  --gutter: 40px;
  --gutter-phone: 20px;
  --measure: 32em;
  --radius: 4px;
  --button-height: 56px;
  --focus-ring: 3px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: var(--leading-body);
  overflow-wrap: anywhere;
}

a { color: var(--you); }
a:hover { color: var(--you-hover); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: var(--focus-ring) solid var(--ink);
  outline-offset: 2px;
}

/* The bar on top, and the column under it. */
.bar { border-bottom: 1px solid var(--line); }
.bar-in, main { max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.bar-in { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding-top: 12px; padding-bottom: 12px; }
.bar-in > a { color: var(--ink); font-weight: var(--weight-heading); text-decoration: none; }
.bar-in > a:hover { color: var(--ink); text-decoration: underline; }
.host { color: var(--mute); font-family: var(--font-mono); font-size: var(--size-small); }
main { padding-top: 32px; padding-bottom: 64px; }

h1 { color: var(--ink); font-size: var(--size-h3); font-weight: var(--weight-heading); line-height: var(--leading-h3); margin: 0 0 16px; }
p { margin: 0 0 16px; }
.note { color: var(--mute); font-size: var(--size-small); line-height: var(--leading-small); }

/* What is wrong with a form, above it: a line of ink on the soft grey, never red. */
.problem { margin: 0 0 24px; padding: 12px 16px; border-left: 4px solid var(--ink); background: var(--soft); color: var(--ink); font-weight: var(--weight-heading); }

section { margin: 48px 0 0; }
h2 { margin: 0 0 12px; color: var(--ink); font-size: var(--size-body); font-weight: var(--weight-heading); }

form { margin: 0 0 32px; }
label { display: block; margin: 24px 0 6px; color: var(--ink); font-weight: var(--weight-heading); }
textarea { display: block; width: 100%; padding: 12px 14px; border: 1px solid var(--mute); border-radius: var(--radius); background: var(--bg); color: var(--ink); font: inherit; resize: vertical; }
textarea + .note { margin: 6px 0 0; }
input[type="email"], input[type="text"] {
  display: block;
  width: 100%;
  min-height: var(--button-height);
  padding: 0 14px;
  border: 1px solid var(--mute);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}
input + .note { margin: 6px 0 0; }
#code { font-family: var(--font-mono); letter-spacing: 0.3em; }

button {
  display: block;
  width: 100%;
  min-height: var(--button-height);
  margin-top: 32px;
  padding: 0 24px;
  border: 1px solid var(--you);
  border-radius: var(--radius);
  background: var(--you);
  color: var(--bg);
  font: inherit;
  font-weight: var(--weight-heading);
  cursor: pointer;
}
button:hover { background: var(--you-hover); border-color: var(--you-hover); }
button.quiet { background: var(--bg); border-color: var(--ink); color: var(--ink); }
button.quiet:hover { background: var(--soft); border-color: var(--ink); }
/* The button that asks for another code: in a sentence, drawn as a link. */
button.link { display: inline; width: auto; min-height: 0; margin: 0; padding: 0; border: 0; background: none; color: var(--you); font-weight: inherit; text-decoration: underline; }
button.link:hover { background: none; color: var(--you-hover); }

/* The account as it was signed up: a name of a field, then its value, set apart by lines. */
dl { margin: 24px 0 0; border-top: 1px solid var(--line); }
dt { margin-top: 12px; color: var(--mute); font-size: var(--size-small); line-height: var(--leading-small); }
dd { margin: 0; padding-bottom: 12px; border-bottom: 1px solid var(--line); color: var(--ink); }

/* A work: the list of them, each small with its name; the card of two accounts on one, as wide as the column; the choices of its form. */
input[type="file"] { display: block; width: 100%; padding: 14px; border: 1px solid var(--mute); border-radius: var(--radius); color: var(--ink); font: inherit; }
fieldset { margin: 24px 0 0; padding: 0; border: 0; min-width: 0; }
legend { margin: 0 0 6px; padding: 0; color: var(--ink); font-weight: var(--weight-heading); }
fieldset .note { margin: 0 0 6px; }
button + .note { margin-top: 12px; }
.problem p { margin: 0; }
.problem ul { margin: 8px 0; padding-left: 1.2em; font-weight: normal; }
/* Why a work was returned, with the line breaks it was typed with; and the terms, set apart from the form around them. */
.problem .reason { margin: 8px 0; font-weight: normal; white-space: pre-line; }
form h2 { margin-top: 32px; }
.terms { margin: 0 0 24px; padding: 16px 16px 0; border: 1px solid var(--line); border-radius: var(--radius); }
.works { margin: 24px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.works > li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.works > li > a { display: flex; align-items: center; gap: 16px; font-weight: var(--weight-heading); }
.works img { flex: none; border-radius: var(--radius); }
.works .note { margin: 6px 0 0; }
figure { margin: 0 0 24px; }
figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
figcaption { margin-top: 6px; }

/* The review pages: the links to their lists on a line of their own in the bar, and a list of accounts, each with its buttons side by side. */
.lists { display: flex; flex-wrap: wrap; gap: 4px 16px; width: 100%; }
.lists a { color: var(--text); }
.accounts { margin: 24px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.accounts > li { padding: 16px 0 24px; border-bottom: 1px solid var(--line); }
.accounts h2 { margin: 0 0 4px; color: var(--ink); font-size: var(--size-body); font-weight: var(--weight-heading); }
.accounts p { margin: 0; }
.accounts form { display: inline-block; margin: 16px 12px 0 0; vertical-align: bottom; }
.accounts button { width: auto; margin-top: 0; }
label.check { margin: 0 0 12px; font-weight: normal; }

@media (max-width: 759px) {
  body { font-size: var(--size-body-phone); }
  .bar-in, main { padding-left: var(--gutter-phone); padding-right: var(--gutter-phone); }
  h1 { font-size: var(--size-h3-phone); }
  .accounts h2 { font-size: var(--size-body-phone); }
}
