:root {
  color-scheme: light dark;
  --paper: #eef1f5;
  --sheet: #ffffff;
  --ink: #14213d;
  --muted: #566078;
  --line: #d5dbe5;
  --key: #ffc53d;
  --app: #14213d;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --serif: "New York", ui-serif, Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #0f1524; --sheet: #182033; --ink: #edf0f7; --muted: #a3adc2; --line: #2d374e; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--sans); }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--key); outline-offset: 2px; }
button { min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; background: transparent; cursor: pointer; white-space: nowrap; }
button:hover { border-color: var(--ink); }
button.primary { background: var(--app); border-color: var(--app); color: #fff; font-weight: 600; }
a { color: inherit; }

/* Door: login, first password */
.door { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: #14213d; color: #fff; }
.door form, .door .note { width: min(420px, 100%); }
.door img { width: 72px; display: block; margin-bottom: 24px; }
.door h1 { font: 700 34px/1.15 var(--serif); margin: 0 0 8px; }
.door p { margin: 0 0 24px; color: #c6cedd; }
.door label { display: block; font-weight: 600; margin-bottom: 6px; }
.door input { width: 100%; min-height: 48px; padding: 0 14px; border-radius: 10px; border: 1px solid #55617c; background: #0d1730; color: #fff; }
.door button { width: 100%; margin-top: 16px; background: var(--key); border-color: var(--key); color: #14213d; font-weight: 700; min-height: 48px; }
.door .error { color: #ffb4a8; margin: 12px 0 0; min-height: 1.5em; }

/* Shell: the dock of app icons is the navigation */
.shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100vh; }
.dock { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 16px 10px; background: #14213d; color: #fff; display: flex; flex-direction: column; gap: 2px; }
.dock h1 { font: 700 20px/1.2 var(--serif); margin: 4px 8px 14px; }
.dock a { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 8px; border-radius: 12px; text-decoration: none; color: #d4dbe9; }
.dock a:hover { background: #22325a; }
.dock a[aria-current="page"] { background: #fff; color: #14213d; font-weight: 600; }
.dock img { width: 34px; height: 34px; border-radius: 8px; flex: none; }
.dock button { margin-top: auto; color: #d4dbe9; border-color: #3a4a70; flex: none; }

main { min-width: 0; padding-bottom: 96px; }
.hero { position: relative; }
.hero > img { display: block; width: 100%; aspect-ratio: 3840 / 1646; }
.intro, section { max-width: 1040px; margin: 0 auto; padding: 0 32px; }
.intro p { color: var(--muted); margin: 16px 0 0; }
section > h2 { font: 700 30px/1.2 var(--serif); margin: 48px 0 4px; }
section > .why { color: var(--muted); margin: 0 0 16px; max-width: 68ch; }

/* A row = what App Store Connect or TikTok asks for, its value, and the copy action */
.rows { background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.row { display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; gap: 16px; padding: 14px 16px; align-items: start; }
.row + .row { border-top: 1px solid var(--line); }
.row .name { font-weight: 600; }
.row .name small { display: block; font-weight: 400; color: var(--muted); }
.row .name small.over { color: #c42b1c; font-weight: 600; }
.value { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.value.long { max-height: 220px; overflow-y: auto; }
.row input, .row textarea { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.row textarea { resize: vertical; min-height: 76px; }
.actions { display: flex; gap: 8px; }
.savebar { display: flex; justify-content: flex-end; padding: 14px 16px; border-top: 1px solid var(--line); }

/* Images: click to copy */
.gallery h3 { font-size: 16px; margin: 24px 0 8px; }
.gallery h3 small { font-weight: 400; color: var(--muted); }
.strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
figure { margin: 0; flex: none; }
figure img { display: block; height: 420px; width: auto; border-radius: 14px; background: var(--line); }
.strip.wide img { height: 250px; }
.strip.square img { height: 200px; border-radius: 50%; }
figcaption { display: flex; gap: 8px; margin-top: 8px; }
figcaption button, figcaption a { flex: 1; }
figcaption a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; }
figcaption a:hover { border-color: var(--ink); }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #14213d; color: #fff; border: 1px solid #55617c; padding: 12px 18px; border-radius: 12px; max-width: calc(100vw - 32px); z-index: 2; }

@media (max-width: 760px) {
  .shell { display: block; }
  .dock { position: sticky; z-index: 1; height: auto; flex-direction: row; overflow-x: auto; padding: 8px; align-items: center; }
  .dock h1 { display: none; }
  .dock a { flex: none; }
  .dock a span { display: none; }
  .dock a[aria-current="page"] span { display: inline; }
  .dock button { margin: 0 0 0 8px; }
  .intro, section { padding: 0 16px; }
  .row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  figure img { height: 340px; }
  .strip.wide img { height: 170px; }
}
