/* transfer.scribes.net — Joe's back-end design standard (cowork-memory
   website/back-end-standard.md, the Dashboard layer): Atkinson Hyperlegible
   Next; grayscale with one alert orange; 18px body, 14px floor; 8-point
   spacing; 5px buttons and fields; lines no wider than 670px; phone text
   on a 41px edge. */
@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible+Next:wght@400;600;700&display=swap');

:root {
  --ink: #202428;
  --gray-700: #4B5259;
  --gray-500: #5B636B;
  --field-edge: #8A9299;
  --gray-300: #C7CCD1;
  --gray-100: #ECEEF0;
  --gray-50: #F5F6F7;
  --alert: #D9731C;
  --fine: #3E8E5A;
  --font: "Atkinson Hyperlegible Next", "Avenir Next", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #fff; color: var(--ink);
  font-family: var(--font); font-size: 18px; line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
main { max-width: 670px; margin: 0 auto; padding: 48px 24px; }

h1 { font-size: 31px; font-weight: 600; line-height: 1.2; margin: 0 0 24px; }
h2 { font-size: 26px; font-weight: 600; line-height: 1.25; margin: 48px 0 16px; overflow-wrap: anywhere; }
h3 { font-size: 22px; font-weight: 600; margin: 32px 0 8px; }
p { margin: 0 0 17px; }
a { color: var(--ink); text-underline-offset: 3px; }
strong { font-weight: 600; }

.frame { font-size: 14px; color: var(--gray-500); margin: 0 0 8px; }
.muted { font-size: 16px; color: var(--gray-500); }
.nav { font-size: 16px; margin-bottom: 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav .btn.signout { margin: 0 0 0 auto; height: auto; min-height: 0; padding: 0 0 0 8px; font-size: 16px; line-height: 1.5; }   /* Sign out at the top right of the home, exchange, account and admin pages, on the line of the links beside it */
/* the upload section sits in a light panel, apart from the file list below */
.panel { background: var(--gray-50); border: 1px solid var(--gray-300); border-radius: 5px; padding: 8px 24px 24px; margin-top: 32px; }
.panel > h2:first-child { margin-top: 16px; }
.hidden { display: none !important; }
.btn + .muted { margin-top: 8px; }   /* a note under its button, e.g. the passkey explainer */

label { display: block; font-size: 14px; color: var(--gray-500); margin: 16px 0 2px; }
input[type="text"], input[type="email"] {
  display: block; width: 100%; height: 40px; padding: 0 12px;
  font: inherit; font-size: 18px; color: var(--ink);
  border: 1px solid var(--field-edge); border-radius: 5px; background: #fff;
}
/* focus: the edge itself darkens and thickens, no ring with a gap
   (back-end standard: no thick-and-thin combination borders) */
input:focus-visible, .btn:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
input.code { font-size: 24px; letter-spacing: 0.15em; max-width: 220px; }

.btn {
  display: inline-block; height: 40px; padding: 0 24px; margin: 24px 8px 0 0;
  font: inherit; font-size: 18px; font-weight: 400; line-height: 38px; text-decoration: none;
  color: var(--ink); background: #fff; border: 1px solid var(--gray-500); border-radius: 5px; cursor: pointer;
}
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; letter-spacing: 0.04em; }
.btn.primary:focus-visible { background: var(--gray-700); border-color: var(--gray-700); box-shadow: none; }   /* the filled button shows focus by its fill, no ring */
.btn.quiet { border-color: transparent; color: var(--gray-700); padding: 0 8px; }
.btn.small { margin: 0; padding: 0 16px; }   /* the row button keeps the full 40/44 height and 18px text */
.btn:disabled { opacity: 0.5; cursor: default; }

/* messages: the words are ink; a mark beside them carries the state */
.error, .ok { font-size: 16px; color: var(--ink); padding-left: 20px; position: relative; margin-top: 16px; }
.error::before, .ok::before { content: ""; position: absolute; left: 0; top: 0.45em; border-radius: 50%; }
.error::before { width: 12px; height: 12px; background: var(--alert); }
.ok::before { width: 8px; height: 8px; top: 0.55em; left: 2px; background: var(--fine); }

.devrow {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--gray-300);
}
.devrow .frame { margin: 0; }
a.rowlink { text-decoration: none; color: var(--ink); padding-left: 24px; padding-right: 24px; }
a.rowlink:hover { background: var(--gray-100); }
.chev { color: var(--gray-500); }

/* the file list: rows between hairlines (back-end standard 1.8, 24px at the
   sides); the whole summary opens the row's details, with a 14px chevron at
   the left that turns when open (1.9) */
.filerow { border-bottom: 1px solid var(--gray-300); }
.filerow:first-child { border-top: 1px solid var(--gray-300); }
.summary {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 14px 24px 8px;
  font: inherit; color: var(--ink); text-align: left; background: none; border: 0; cursor: pointer;
}
.summary:hover { background: var(--gray-100); }
.summary:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--ink); }
.summary .chev { flex: none; width: 12px; text-align: center; font-size: 14px; color: var(--gray-500); line-height: 25px; transition: transform .15s; }
.summary .chev.open { transform: rotate(90deg); }
.sumtext { display: flex; flex-direction: column; min-width: 0; }
.fname { font-weight: 600; overflow-wrap: anywhere; }
.sumtext .frame { margin: 2px 0 0; }
.labels { font-size: 16px; color: var(--gray-500); margin-top: 4px; }
.rowbody { padding: 0 24px 14px 112px; }   /* indented to the summary text: 24 + 12 chevron + 10 gap + 56 picture + 10 gap */
/* the file's small picture (Drive's), or its kind in a gray square */
.thumb {
  flex: none; width: 56px; height: 56px; border-radius: 3px; overflow: hidden; background: var(--gray-100); border: 1px solid var(--gray-300); box-sizing: border-box;   /* the hairline keeps a mostly white picture (a page of text) visible as a square */
  display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--gray-500);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.player { margin-top: 12px; }
.player video, .player img { display: block; max-width: 100%; max-height: 70vh; background: var(--gray-50); }
.player audio { width: 100%; }
.player.wide video, .player.wide img { width: 100%; height: auto; max-height: 85vh; margin: 0 auto; object-fit: contain; }   /* across the window, up to 1200px (x.js widen) */
.detail { margin-top: 8px; font-size: 16px; color: var(--gray-500); }
.detail > .frame { margin-top: 16px; }
.detail form .btn { margin-top: 8px; }
.labelrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; color: var(--ink); font-size: 18px; }
.btn.saved { font-style: italic; color: var(--gray-500); border-color: var(--gray-300); }
.btn.delete { margin-top: 48px; }   /* 48px below the other controls (1.12) */
.sortbar { max-width: 240px; margin-bottom: 16px; }
.sortbar label { margin-top: 0; }
select, input[type="file"] { display: block; width: 100%; font: inherit; font-size: 18px; color: var(--ink); }
select { height: 40px; padding: 0 8px; border: 1px solid var(--field-edge); border-radius: 5px; background: #fff; }
select:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
input[type="file"] { padding: 8px 0; }
#up-list { margin-top: 16px; }
#up-queue { margin-top: 16px; }
#up-queue h3 { margin: 0 0 8px; font-weight: 400; }
.plainlist { list-style: none; margin: 0; padding: 0; }
.qname { min-width: 0; overflow-wrap: anywhere; }   /* long camera file names wrap instead of pushing Remove off a phone screen */
#form-up.dragging { outline: 2px dashed var(--gray-500); outline-offset: 8px; }   /* files dragged over the section */

/* a checkbox with its words beside it, on a 44px row so it is easy to hit */
label.check { display: flex; align-items: center; gap: 12px; min-height: 44px; margin: 0; font-size: 18px; color: var(--ink); cursor: pointer; }
/* drawn here, not by the browser, so focus can work like a text field's: the
   edge itself darkens and thickens, no ring with a gap (1.12) */
label.check input {
  appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 0;
  border: 1px solid var(--field-edge); border-radius: 3px; background: #fff center / 14px 14px no-repeat;
}
label.check input:checked {
  background-color: var(--ink); border-color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
label.check input:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }

/* the admin page's exchange summary: rows between hairlines, 14px above and
   below (1.8), five columns on a desktop; on a phone each exchange folds into
   a label-over-value card, pairs two across (1.7, spacing 1.5) */
.srow { display: grid; grid-template-columns: 2fr 1fr 1fr 2fr 1.4fr; gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--gray-300); font-size: 16px; }
.srow.shead { font-size: 14px; color: var(--gray-500); border-top: 1px solid var(--gray-300); padding: 8px 0; }
.sname { font-weight: 600; font-size: 18px; overflow-wrap: anywhere; }
.scell .slabel { display: none; }
.scell { overflow-wrap: anywhere; min-width: 0; }

/* confirm box over the page: 3px corners, 24px padding, the pair at the right */
dialog.confirm {
  border: 1px solid var(--gray-300); border-radius: 3px; padding: 24px; color: var(--ink);
  max-width: min(480px, calc(100% - 48px)); box-shadow: 0 2px 8px rgba(32,36,40,.10);
}
dialog.confirm::backdrop { background: transparent; }   /* no dimming behind it */
.pair { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; width: max-content; margin-left: auto; }   /* equal widths, at the right edge */
.pair .btn { margin-right: 0; }

@media (max-width: 640px) {
  main { padding: 32px 41px; }
  h1 { font-size: 26px; }
  .btn, .btn.small { height: 44px; line-height: 42px; }
  .pair { width: auto; margin-left: 0; }   /* a pair splits the row in equal halves on a phone */
  dialog.confirm { margin: auto auto 24px; }   /* low on the screen, 24px from the bottom */
  .summary { padding-left: 0; padding-right: 0; }   /* rows meet the 41px phone text edge */
  .rowbody { padding: 0 0 14px 88px; }   /* under the file name: 12 chevron + 10 gap + 56 picture + 10 gap */
  a.rowlink { padding-left: 0; padding-right: 0; }
  .btn.saved { display: block; width: 100%; }   /* on a phone, "Saved" fills the row (1.12) */
  .srow { grid-template-columns: 1fr 1fr; gap: 8px 16px; padding: 12px 0; }
  .srow .sname { grid-column: 1 / -1; }
  .srow.shead { display: none; }
  .summarylist { border-top: 1px solid var(--gray-300); }   /* the header row (and its rule) is hidden on a phone */
  .scell .slabel { display: block; font-size: 14px; line-height: 16px; color: var(--gray-500); }   /* sits directly on its value (1.5) */
  input[type="text"], input[type="email"], select { height: 44px; }
  .panel { padding: 0 16px 16px; }   /* a phone keeps more width for the field and list */
}


/* overbo-skelley-family edit page: the dish rows, the submissions, Remove */
.dishlist { border-top: 1px solid var(--gray-300); }
.dish .who { font-weight: 600; }
.dish .open { font-size: 14px; color: var(--gray-500); }
.sub { border-top: 1px solid var(--gray-300); padding: 16px 0 8px; }
.sub .sname { font-weight: 600; font-size: 20px; margin: 0; }
.sub .frame { margin: 12px 0 0; }
.sub p { margin-bottom: 4px; overflow-wrap: anywhere; }
form.remove { margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--gray-300); }
