/* Styles for the profile pages: /profile (edit your own) and /member (view
   someone else's). They follow the homepage: near-black page, the seal,
   Roboto for all text, green buttons. */

@font-face { font-family: "Roboto"; font-style: normal; font-weight: 300; font-display: swap; src: url(/fonts/roboto-300.woff2) format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/roboto-400.woff2) format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/roboto-500.woff2) format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/roboto-700.woff2) format("woff2"); }

:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --card: #111111;
  --ink: #d9d9d9;
  --bright: #ececec;
  --muted: #9a9a9a;
  --field: #0d0d0d;
  --line: #353534;
  --line-2: #242423;
  --green: #4bce55;
  --button: #1b7a37;
  --button-hover: #21903f;
  --error: #ff9a8f;
  --font: "Roboto", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font: 300 17px/1.6 var(--font);
  letter-spacing: .01em; -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--green); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid rgba(75, 206, 85, .5); outline-offset: 2px; }
h1, h2, p { margin: 0; }

/* ---------- top bar ---------- */
.nav { border-bottom: 1px solid var(--line-2); }
.nav-in {
  max-width: 880px; margin: 0 auto; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--bright); text-decoration: none; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; }
.brand img { width: 36px; height: 36px; display: block; }
.nav-links { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav-links a, .nav-links button {
  font: 500 12px/1 var(--font); letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); background: none; border: 1px solid transparent; border-radius: 6px;
  padding: 10px 12px; text-decoration: none; cursor: pointer;
}
.nav-links a:hover, .nav-links button:hover { color: var(--bright); }
.nav-links a[aria-current="page"] { color: var(--bright); border-color: var(--line); }
.nav-links a.cta { background: var(--button); border-color: #2a8f49; color: #fff; }
.nav-links button.logout { border-color: var(--line); }

/* ---------- layout ---------- */
main { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 48px 16px 80px; }
.head { text-align: center; margin-bottom: 36px; }
.eyebrow { font: 500 12px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--green); }
.head h1 { margin-top: 14px; font: 400 clamp(32px, 6vw, 46px)/1.1 var(--font); color: var(--bright); }
.head p { margin-top: 12px; color: var(--muted); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 32px; }
@media (max-width: 560px) { .card { padding: 22px 18px; } main { padding-top: 32px; } }

/* ---------- form ---------- */
.form { display: flex; flex-direction: column; gap: 20px; }
.section { margin-top: 10px; padding-top: 22px; border-top: 1px solid var(--line-2); font: 500 12px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
label, .label { font: 500 12px/1.3 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.optional { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: .02em; }
.hint { font-size: 14px; color: var(--muted); }
input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="search"], input[type="tel"], select, textarea {
  width: 100%; min-height: 52px; padding: 12px 16px; background: var(--field); color: var(--bright);
  border: 1px solid var(--line); border-radius: 6px; font: 400 18px/1.4 var(--font);
}
textarea { min-height: 140px; resize: vertical; }
textarea.short { min-height: 92px; }
input::placeholder, textarea::placeholder { color: #6f6f6f; opacity: 1; }
input:focus, textarea:focus { outline: 0; border-color: var(--green); box-shadow: 0 0 0 3px rgba(75, 206, 85, .18); }

/* A social field: the network icon sits inside the box, on the left. */
.with-icon { position: relative; }
.with-icon .icon { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.with-icon input { padding-left: 44px; }

.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check, .check .hint { font: 300 16px/1.5 var(--font); text-transform: none; letter-spacing: .02em; }
.check .hint { font-size: 14px; }
.check input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--green); flex: none; }

/* ---------- buttons ---------- */
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn {
  min-height: 52px; padding: 0 26px; border-radius: 6px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  background: var(--button); color: #fff; border: 1px solid #2a8f49;
  font: 500 14px/1 var(--font); letter-spacing: .1em; text-transform: uppercase;
}
.btn:hover { background: var(--button-hover); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.quiet { background: none; color: var(--ink); border-color: var(--line); }
.btn.quiet:hover { border-color: var(--muted); }
.btn.danger { background: none; color: var(--error); border-color: #5a3330; }
.btn.danger:hover { border-color: var(--error); }
@media (max-width: 560px) { .btn-row .btn { width: 100%; } }

.notice { padding: 14px 16px; border-radius: 6px; border: 1px solid var(--line); font-size: 16px; }
.notice.error { color: var(--error); border-color: #5a3330; }
.notice.good { color: var(--green); border-color: #24502b; }

/* ---------- profile view ---------- */
.profile { text-align: center; }
.avatar {
  width: 96px; height: 96px; margin: 0 auto; border-radius: 50%;
  display: grid; place-items: center; background: var(--field); border: 1px solid var(--line);
  font: 400 38px/1 var(--font); color: var(--green); letter-spacing: .02em;
}
.profile h1 { margin-top: 20px; font: 400 clamp(32px, 6vw, 44px)/1.1 var(--font); color: var(--bright); }
.profile .business { margin-top: 8px; font-size: 19px; letter-spacing: .06em; color: var(--ink); }
.profile .about { margin: 28px auto 0; max-width: 54ch; text-align: left; font-size: 18px; line-height: 1.7; white-space: pre-line; }
.profile .owner { margin-top: 28px; }

.socials { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.social {
  display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--field); color: var(--bright);
  font: 500 13px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  transition: border-color .12s ease, color .12s ease, background .12s ease;
}
.social .icon { width: 18px; height: 18px; flex: none; }
.social:hover { border-color: var(--green); color: #fff; background: #0f1a11; }
.social:hover .icon { color: var(--green); }

.tag { display: inline-block; margin-top: 14px; padding: 6px 12px; border: 1px solid #5a4a1e; border-radius: 999px; color: #e2c46b; font: 500 11px/1 var(--font); letter-spacing: .1em; text-transform: uppercase; }

.back { display: inline-block; margin-bottom: 20px; color: var(--muted); text-decoration: none; font: 500 12px/1 var(--font); letter-spacing: .1em; text-transform: uppercase; }
.back:hover { color: var(--bright); }

/* ---------- sign in ---------- */
main.narrow { max-width: 480px; }
main.wide { max-width: 980px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); }
.switch button {
  min-height: 42px; border: 0; border-radius: 5px; background: none; color: var(--muted); cursor: pointer;
  font: 500 12px/1 var(--font); letter-spacing: .1em; text-transform: uppercase;
}
.switch button[aria-selected="true"] { background: var(--line-2); color: var(--bright); }
.form > .btn { width: 100%; }
.or { text-align: center; margin: 20px 0 12px; }
#g-button { display: flex; justify-content: center; }

/* ---------- member directory ---------- */
.search { margin-bottom: 14px; }
.count { color: var(--muted); font-size: 15px; margin-bottom: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.member-card {
  display: flex; flex-direction: column; gap: 6px; padding: 22px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: inherit; text-decoration: none; transition: border-color .12s ease, background .12s ease;
}
.member-card:hover { border-color: var(--green); background: #0f1a11; }
.member-card .who { display: flex; align-items: center; gap: 14px; }
.member-card .avatar { width: 48px; height: 48px; margin: 0; font-size: 20px; flex: none; }
.member-card .name { font: 400 22px/1.15 var(--font); color: var(--bright); }
.member-card .biz { font-size: 15px; color: var(--muted); letter-spacing: .04em; }
.member-card .blurb { margin-top: 8px; font-size: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.member-card .tag { align-self: flex-start; margin-top: 8px; }
.empty { padding: 28px; border: 1px dashed var(--line); border-radius: 10px; text-align: center; color: var(--muted); }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 22px; margin-bottom: 20px; border: 1px solid #24502b; border-radius: 10px; background: #0d160f; }

/* ---------- photos ---------- */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.big { width: 96px; height: 96px; margin: 0; font-size: 36px; flex: none; }
.photo-pick { display: flex; align-items: center; gap: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--line-2); }
.photo-actions { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.photo-actions .btn-row { gap: 8px; }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 12px; }
@media (max-width: 560px) {
  .photo-pick { flex-direction: column; align-items: flex-start; }
  .photo-actions .btn-row .btn { width: auto; }
}

/* ---------- sign-in code ---------- */
.sent-to { font-size: 17px; }
.sent-to strong { color: var(--bright); font-weight: 400; overflow-wrap: anywhere; }
.code-input { font: 400 30px/1 var(--font) !important; font-variant-numeric: tabular-nums; letter-spacing: .4em; text-align: center; }
.code-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.linkish:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.linkish { background: none; border: 0; padding: 0; color: var(--green); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.form > .btn.quiet { width: 100%; }

/* ---------- business block on a profile ---------- */
.biz-block { margin: 30px auto 0; max-width: 54ch; text-align: left; padding-top: 22px; border-top: 1px solid var(--line-2); }
.biz-block h2 { font: 500 11px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.biz-name { font: 400 22px/1.2 var(--font); color: var(--bright); }
.biz-about { margin-top: 10px; font-size: 17px; line-height: 1.7; white-space: pre-line; }

/* ---------- step-by-step forms (/profile, /business-edit) ---------- */
.block { display: flex; flex-direction: column; gap: 20px; }
.block h2 { font: 400 28px/1.15 var(--font); color: var(--bright); outline: none; }
.block h2 .optional { font: 300 15px/1 var(--font); }
.block > p:not(.hint) { font-size: 18px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.aside { margin-top: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 15px; }
.danger-link { color: var(--error); }
.center { text-align: center; justify-content: center; }
#actions .btn[type="submit"] { margin-left: auto; }
@media (max-width: 560px) {
  #actions .btn[type="submit"] { margin-left: 0; order: -1; }
}

/* ---------- logos, business lists, run by ---------- */
.avatar.logo { border-radius: 14px; }
.member-card .avatar.logo { border-radius: 10px; }
.profile > .avatar.logo { width: 96px; height: 96px; }
.owned { margin-top: 28px; }
.section-title { font: 500 12px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.profile .owner.btn-row { justify-content: center; }
.run-by {
  display: flex; align-items: center; gap: 14px; max-width: 54ch; margin: 32px auto 0; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: 10px; text-align: left; text-decoration: none; color: inherit;
}
.run-by:hover { border-color: var(--green); background: #0f1a11; }
.run-by .avatar { width: 48px; height: 48px; margin: 0; font-size: 20px; flex: none; }
.run-by .label { display: block; font: 500 11px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.run-by .name { display: block; font: 400 22px/1.15 var(--font); color: var(--bright); }
.tabs { max-width: 360px; margin: 0 0 14px; }
.more-row { display: flex; justify-content: center; margin-top: 22px; }
.tabs a {
  min-height: 42px; display: grid; place-items: center; border-radius: 5px; color: var(--muted); text-decoration: none;
  font: 500 12px/1 var(--font); letter-spacing: .1em; text-transform: uppercase;
}
.tabs a[aria-current="page"] { background: var(--line-2); color: var(--bright); }
.tabs a:not([aria-current="page"]):hover { color: var(--bright); }
.profile .lead { margin: 24px auto 0; max-width: 54ch; font: 400 21px/1.45 var(--font); color: var(--bright); }
.profile .lead + .about { margin-top: 14px; }
.block .eyebrow { margin-bottom: -8px; }

/* ---------- cards with their own links ----------
   The name is the card's link and stretches over the whole card. The
   social icons sit above it, so each opens its own page. */
.member-card { position: relative; }
.member-card .card-link { display: block; color: var(--bright); text-decoration: none; }
.member-card .card-link::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
.member-card .card-link:focus-visible { outline: none; }
.member-card:has(.card-link:focus-visible) { outline: 3px solid rgba(75, 206, 85, .5); outline-offset: 2px; }
.mini-socials { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mini {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); background: var(--field); color: var(--ink);
  transition: border-color .12s ease, color .12s ease;
}
.mini .icon { width: 16px; height: 16px; }
.mini:hover { border-color: var(--green); color: var(--green); }

/* ---------- your businesses, side by side, on /profile ---------- */
.my-businesses { margin: 32px 0 0; padding-top: 24px; border-top: 1px solid var(--line-2); }
.biz-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.biz-tile {
  flex: 0 0 230px; width: 230px; min-width: 0; scroll-snap-align: start; display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: inherit; text-decoration: none;
}
.biz-tile:hover { border-color: var(--green); background: #0f1a11; }
.biz-tile .avatar { width: 44px; height: 44px; margin: 0; font-size: 18px; flex: none; }
.biz-tile .words { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.biz-tile .name { font: 400 19px/1.15 var(--font); color: var(--bright); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.biz-tile .sub { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.biz-row:not(:empty) { margin-bottom: 14px; }
.my-businesses .biz-add { width: auto; }

/* ---------- the landing page (/, the sign-in page) ----------
   The seal, the wordmark, and the tagline, as on the first homepage, with
   the email code form under them. */
main.landing { max-width: 480px; display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 64px; }
.landing .seal { width: 110px; height: 110px; display: block; }
.landing h1 { margin: 0; font-size: 0; line-height: 0; }
.landing .wordmark { display: block; width: min(455px, 84vw); height: auto; margin-top: 26px; }
.landing .motto { margin-top: 26px; font: 400 22px/1.3 var(--font); letter-spacing: .02em; color: var(--bright); }
.landing .prompt { margin: 48px 0 18px; font-size: 16px; letter-spacing: .04em; color: var(--muted); }
.landing .card { width: 100%; text-align: left; }
@media (max-width: 560px) {
  main.landing { padding-top: 44px; }
  .landing .seal { width: 96px; height: 96px; }
  .landing .prompt { margin-top: 36px; }
}

/* /profile: the details and the links are two separate boxes in one form. */
.card-title { font: 400 26px/1.15 var(--font); color: var(--bright); }
.card-title + .hint { margin-top: -10px; }
