/* The account page, on top of /style.css (same colours, same type). */

main.wide { max-width: 72rem; }
.bar { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.bar .mark { margin: 0; text-decoration: none; }
.bar #who { margin-left: auto; overflow-wrap: anywhere; }

.layout { display: grid; grid-template-columns: 16rem 1fr; gap: 2rem; align-items: start; }
@media (max-width: 760px) { .layout { grid-template-columns: 1fr; gap: 1.25rem; } }

.designs { list-style: none; padding: 0; margin: 0; }
.designs a {
  display: flex; flex-direction: column; gap: 0.1rem;
  padding: 0.65rem 0.8rem; margin: 0.35rem 0; min-height: 44px;
  background: var(--card); border: 1px solid var(--line); border-radius: 0.6rem;
  color: var(--ink); text-decoration: none;
}
.designs a.current { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.designs .role { font-size: 0.8rem; color: var(--muted); }
/* Download and Delete beside each design its person owns; Deleted designs below. */
.design-actions { display: flex; gap: 0.75rem; margin: -0.2rem 0 0.4rem 0.3rem; }
.design-actions .change, .trash .change { font-size: 0.85rem; background: none; border: none; color: var(--accent); cursor: pointer; padding: 0.25rem 0; min-height: 44px; }
.design-actions .danger { color: #c0392b; }
#trash-section { margin-top: 1.5rem; }
.trash { list-style: none; padding: 0; margin: 0; }
.trash li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.6rem; margin: 0.4rem 0; }
.trash .name { overflow-wrap: anywhere; }
.trash .role { font-size: 0.8rem; color: var(--muted); }

#panel h2 { font-size: 1.4rem; margin: 0 0 1rem; }
.group { border-top: 1px solid var(--line); padding: 1rem 0 0.25rem; }
.group h3 { font-size: 1rem; margin: 0 0 0.6rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; }
.group h4 { font-size: 0.9rem; margin: 0.6rem 0 0.4rem; color: var(--muted); }
.count {
  font-size: 0.8rem; font-weight: 600; padding: 0.05rem 0.5rem; border-radius: 1rem;
  background: var(--accent); color: var(--accent-ink);
}
.gloss { font-weight: 400; font-size: 0.85rem; color: var(--muted); }
.group ul { list-style: none; padding: 0; margin: 0 0 0.5rem; }

.entry {
  display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 0.5rem;
  padding: 0.55rem 0.8rem; margin: 0.35rem 0;
}
.entry .name { overflow-wrap: anywhere; }
.entry.gone .name { text-decoration: line-through; color: var(--muted); }
.chip {
  flex: none; font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); border-radius: 0.3rem; padding: 0.05rem 0.4rem;
}
.chip.s-proposed { color: #b7791f; border-color: currentColor; }
.chip.s-accepted, .chip.s-met, .chip.s-verified, .chip.s-realized { color: var(--accent); border-color: currentColor; }

.group details { margin: 0.4rem 0; }
.group summary { cursor: pointer; color: var(--muted); padding: 0.4rem 0; }

.gaps .gap {
  border-left: 4px solid var(--line); background: var(--card);
  padding: 0.5rem 0.75rem; margin: 0.35rem 0; border-radius: 0.3rem;
}
.gaps .gap.high { border-left-color: #c0392b; }
.gaps .gap.mid { border-left-color: #b7791f; }

/* About you: the person's own words, quoted in the nav; the form in the panel. */
#about-section { margin-bottom: 1.5rem; }
.about-text { overflow-wrap: anywhere; white-space: pre-line; border-left: 2px solid var(--line); padding-left: 0.75rem; }
.about-form textarea {
  width: 100%; max-width: 36rem; font: inherit; padding: 0.55rem 0.7rem; resize: vertical;
  border: 1px solid var(--line); border-radius: 0.5rem; background: var(--card); color: var(--ink);
}
.about-form .count-line { margin: 0.25rem 0 0.75rem; font-size: 0.85rem; }

/* Hubs: each hub's name, with its designs indented beneath it. */
#hubs-section { margin-bottom: 1.5rem; }
.hubs { list-style: none; padding: 0; margin: 0; }
.hubs > li { margin: 0.6rem 0; }
.hub-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.hub-head .name { font-weight: 600; overflow-wrap: anywhere; }
.hub-head .change { font-size: 0.85rem; background: none; border: none; color: var(--accent); cursor: pointer; padding: 0.25rem; min-height: 44px; }
.hub-designs { list-style: none; margin: 0.2rem 0 0; padding: 0 0 0 1rem; border-left: 2px solid var(--line); }
.hub-designs li { margin: 0.15rem 0; }
.hub-designs a { color: var(--ink); overflow-wrap: anywhere; }
.hub-designs .quiet { font-size: 0.9rem; }
/* A shared hub: who shared it, what changed since you looked, and why it is closed. */
.hub-head .shared { font-weight: 400; font-size: 0.85rem; color: var(--muted); margin-left: 0.5rem; }
.hub-designs .moved, .invitations .moved { display: block; font-size: 0.8rem; color: var(--muted); }
.hub-designs .hub-own { font-size: 0.9rem; }
.hubs .closed { font-size: 0.9rem; color: #b45309; margin: 0.25rem 0 0; }
.coordinates ul { list-style: none; padding: 0 0 0 1rem; border-left: 2px solid var(--line); }

/* The hub form, shown in the panel. */
.hub-form label.field { display: block; font-weight: 600; margin: 0 0 0.35rem; }
.hub-form input[type="text"] {
  width: 100%; max-width: 28rem; font: inherit; padding: 0.55rem 0.7rem;
  border: 1px solid var(--line); border-radius: 0.5rem; background: var(--card); color: var(--ink);
}
.hub-form fieldset { border: 1px solid var(--line); border-radius: 0.6rem; padding: 0.6rem 0.9rem; margin: 1rem 0; }
.hub-form legend { font-weight: 600; padding: 0 0.3rem; }
.hub-form .pick { display: flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0; min-height: 44px; }
.hub-form .pick input { width: 1.1rem; height: 1.1rem; }
.hub-form .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.hub-form .danger { color: #c0392b; border-color: #c0392b; }
.hub-form .error { color: #c0392b; }

/* Invitations for you, and a design's People section. */
#invitations-section { border: 1px solid var(--accent); border-radius: 0.6rem; padding: 0.75rem 1rem; margin-bottom: 1.5rem; }
#invitations-section h2 { font-size: 1.1rem; margin: 0 0 0.5rem; }
.invitations { list-style: none; padding: 0; margin: 0; }
.invitations li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; padding: 0.4rem 0; }
.invitations .what { flex: 1 1 16rem; overflow-wrap: anywhere; }
.people { list-style: none; padding: 0; margin: 0 0 0.75rem; }
.people li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.people .who { flex: 1 1 14rem; overflow-wrap: anywhere; }
.people select, .share-form select, .share-form input[type="email"] {
  font: inherit; padding: 0.45rem 0.6rem; border: 1px solid var(--line); border-radius: 0.5rem; background: var(--card); color: var(--ink); min-height: 44px;
}
.people .remove, .people .cancel { background: none; border: none; color: #c0392b; cursor: pointer; min-height: 44px; }
.share-form { display: grid; gap: 0.6rem; max-width: 30rem; margin-top: 0.5rem; }
.share-form label { font-weight: 600; }
/* "May make their own copy": per person in People, and on the share form. */
.people .pick, .share-form .pick { display: flex; align-items: center; gap: 0.5rem; min-height: 44px; font-weight: normal; }
.people .pick input, .share-form .pick input { width: 1.1rem; height: 1.1rem; }
.share-form .error { color: #c0392b; }

/* A design's "Connect via the API" (connect.js): a small link under its name,
   and nothing more until it is opened. Then its steps are indented beneath it:
   the labels and explanation are quieter; the commands keep full contrast. */
details.api-connect { background: none; border: none; border-radius: 0; padding: 0; margin: -0.85rem 0 1.25rem; }
.api-connect > summary {
  width: fit-content; min-height: 44px; padding: 0.6rem 0;
  font-weight: 400; font-size: 0.9rem; color: var(--accent);
}
.design-steps { margin-left: 0.5rem; padding-left: 1rem; border-left: 2px solid var(--line); }
.design-steps .group { border-top: none; padding-top: 0.25rem; }
.design-steps h4 { font-size: 0.85rem; font-weight: 600; color: var(--muted); margin: 0.6rem 0 0.2rem; }
.design-steps .gloss, .design-steps summary { font-size: 0.85rem; color: var(--muted); }
.design-steps h4 .gloss { font-weight: 400; margin-left: 0.4rem; }

/* The personal key (connect.js), on a design's page and on the API page. */
.key-controls .actions { margin: 0.5rem 0; }
.key-controls .key-reach { font-size: 0.9rem; }
.key-controls .error { color: #c0392b; }
.key-controls .error:empty { display: none; }
.design-steps .key-controls .button { padding: 0.5rem 1rem; font-size: 0.95rem; }
.design-steps .key-controls .button.secondary { padding: calc(0.5rem - 1px) calc(1rem - 1px); }

/* flo2.io/account/api: a reference page, read top to bottom. */
.reference { max-width: 46rem; }
.reference section { padding-top: 1.25rem; }
.compare { width: 100%; border-collapse: collapse; margin: 0.25rem 0 1rem; font-size: 0.95rem; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 0.55rem 0.6rem; border-top: 1px solid var(--line); }
.compare tr > :first-child { padding-left: 0; }
.compare thead th { border-top: 0; font-size: 0.9rem; color: var(--muted); }
.compare tbody th { font-weight: 600; width: 8rem; }
.compare code { overflow-wrap: anywhere; }
@media (max-width: 620px) {
  .compare thead { display: none; }
  .compare tr, .compare th, .compare td { display: block; width: auto; }
  .compare tr { border-top: 1px solid var(--line); padding: 0.5rem 0; }
  .compare th, .compare td { border-top: 0; padding: 0.15rem 0; }
  .compare td::before { content: attr(data-col) ": "; color: var(--muted); }
}
.catalog-skills { list-style: none; padding: 0; margin: 0 0 0.75rem; }
.catalog-skills li { margin: 0.35rem 0; }
.catalog-tools { list-style: none; padding: 0; margin: 0 0 0.75rem; display: flex; flex-wrap: wrap; gap: 0.3rem 0.5rem; }
.catalog-tools code { font-size: 0.85rem; border: 1px solid var(--line); border-radius: 0.3rem; padding: 0.05rem 0.35rem; }

/* A design's files (filesSection in account.js). */
.files .file-list { list-style: none; padding: 0; }
.files .file { margin: 0.4em 0; }
.files .file-name { font-weight: 600; word-break: break-all; }
.files .versions { margin: 0.2em 0 0 1em; }
.files .versions ul { list-style: none; padding-left: 0.5em; }
.files .upload { display: flex; flex-wrap: wrap; gap: 0.5em; align-items: center; margin: 0.6em 0; }
.files .upload input[type=file] { max-width: 100%; }
.files progress { width: 12em; }

/* Deleting a file (deletePart, retiredRow in account.js). */
.files .change.danger, .files .button.danger { color: #c0392b; }
.files .delete-part { display: inline; }
.files .delete-confirm { margin: 0.4em 0; padding: 0.6em 0.8em; border-left: 3px solid #c0392b; }
.files .delete-confirm input[type=text] { width: 100%; max-width: 30rem; margin: 0.3em 0 0.5em; }
.files .delete-actions { margin: 0.4em 0; }
.files .delete-actions .button { margin-right: 0.5em; }
.files .retired-files { margin: 0.6em 0; }
.files .file.retired .file-name { font-weight: 400; text-decoration: line-through; }

/* A file at a public link (publicPart in account.js). */
.files .public { margin: 0.3em 0 0.6em 1em; }
.files .public .change, .files .public-actions .change { font-size: 0.85rem; background: none; border: none; color: var(--accent); cursor: pointer; padding: 0.25rem 0.5rem 0.25rem 0; min-height: 44px; }
.files .publish-confirm { margin: 0.4em 0; padding: 0.6em 0.8em; border-left: 3px solid var(--accent); }
.files .publish-confirm .button { margin-right: 0.5em; }
.files .public-link { display: flex; flex-wrap: wrap; gap: 0.5em; align-items: center; margin: 0.3em 0; }
.files .public-link code { word-break: break-all; }
.files .qr-box { margin: 0.5em 0; }
.files .qr-box .qr { width: 11rem; height: 11rem; display: block; }
.files .public-actions { display: flex; flex-wrap: wrap; gap: 0.5em; }

/* A design's public page (publicPageSection in account.js): where it stands,
   and its owner's chooser, preview and buttons. */
.public-page .pick { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.35rem 0; min-height: 44px; }
.public-page .pick input { width: 1.1rem; height: 1.1rem; margin-top: 0.2rem; flex: none; }
.public-page .pick-list { max-height: 16rem; overflow-y: auto; padding-left: 1.7rem; }
.public-page .part details, .public-page .chooser > details { margin: 0 0 0.4rem 1.7rem; }
.public-page .chooser h4 { margin-top: 1rem; }
.public-page .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0.75rem 0; }
.public-page .preview-box { border: 1px solid var(--line); border-radius: 0.6rem; padding: 0.6rem 0.9rem; margin: 0.5rem 0 1rem; }
.public-page .plain-line { font-weight: 600; }
.public-page .public-link { display: flex; flex-wrap: wrap; gap: 0.5em; align-items: center; margin: 0.3em 0; }
.public-page .public-link code { word-break: break-all; }
.public-page .qr-box { margin: 0.5em 0; }
.public-page .qr-box .qr { width: 11rem; height: 11rem; display: block; }
.public-page .public-actions { display: flex; flex-wrap: wrap; gap: 0.5em; }
.public-page .public-actions .change { font-size: 0.85rem; background: none; border: none; color: var(--accent); cursor: pointer; padding: 0.25rem 0.5rem 0.25rem 0; min-height: 44px; }
