/* Foshee Family — shared styles for the landing page and the links admin.
   Mobile-first, no framework, no external requests. */

:root {
  --ink: #1b2430;
  --ink-soft: #5b6675;
  --line: #e3e8ee;
  --paper: #ffffff;
  --shell: #f6f8fa;
  --brand: #2f6f5b;          /* deep green */
  --brand-dark: #245646;
  --brand-tint: #e8f2ee;
  --danger: #b3261e;
  --danger-tint: #fdeceb;
  --ok: #146c43;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(27, 36, 48, .05), 0 10px 24px rgba(27, 36, 48, .07);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--shell);
  overflow-x: hidden;
}

.wrap {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding-inline: 20px;   /* the gutter lives here so sections only set padding-block */
  padding-block: 40px 72px;
}

h1 { font-size: clamp(1.6rem, 5vw, 2.1rem); line-height: 1.2; margin: 0 0 6px; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 0 0 14px; }
p { margin: 0 0 14px; }
.muted { color: var(--ink-soft); }
.hint { font-size: .85rem; color: var(--ink-soft); margin: -6px 0 16px; }
.opt { font-weight: 400; color: var(--ink-soft); }

/* ---- Cards ---------------------------------------------------------------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 20px;
}

/* ---- Forms ---------------------------------------------------------------- */
label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin: 0 0 6px;
}

input[type="text"], input[type="url"], input[type="password"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  font: inherit;
  font-size: 16px;          /* keeps iOS from zooming the page on focus */
  min-height: 48px;
  padding: 11px 14px;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-tint);
}

.slug-row {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 6px;
  background: var(--paper);
}
.slug-row:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.slug-prefix {
  display: flex;
  align-items: center;
  padding: 0 4px 0 12px;
  font-size: .9rem;
  color: var(--ink-soft);
  background: var(--shell);
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
.slug-row input {
  border: none;
  margin: 0;
  border-radius: 0;
  min-width: 0;
  flex: 1 1 auto;
}
.slug-row input:focus { box-shadow: none; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 0 20px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.btn:hover { background: var(--brand-dark); }
.btn:disabled { opacity: .65; cursor: default; }
.btn-quiet {
  width: auto;
  flex: 0 0 auto;
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-quiet:hover { background: var(--shell); border-color: var(--ink-soft); }
.actions .btn { width: auto; flex: 1 1 auto; }

.status { margin: 10px 0 0; font-size: .9rem; min-height: 1.2em; color: var(--ink-soft); }
.status.is-ok { color: var(--ok); font-weight: 600; }
.status.is-error { color: var(--danger); font-weight: 600; }

/* ---- Admin: header + link list -------------------------------------------- */
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.panel-head h1 { margin: 0; }
.count { color: var(--ink-soft); font-weight: 400; font-size: .95rem; }

.links { list-style: none; margin: 0; padding: 0; }

.link {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.link:first-child { border-top: none; }

.link-main { min-width: 0; flex: 1 1 220px; }
.link-slug {
  display: block;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.link-slug:hover { text-decoration: underline; }
.link-title { display: block; font-size: .9rem; color: var(--ink); }
.link-dest {
  display: block;
  font-size: .82rem;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.link-acts { display: flex; gap: 6px; flex: 0 0 auto; flex-wrap: wrap; }
.mini {
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.mini:hover { border-color: var(--ink-soft); }
.mini.danger { color: var(--danger); border-color: #f0c8c5; }
.mini.danger:hover { background: var(--danger-tint); }
.mini:disabled { opacity: .5; cursor: default; }

/* ---- Public landing page --------------------------------------------------- */
.home { text-align: center; }
.home .mark {
  width: 74px; height: 74px;
  margin: 0 auto 18px;
  display: block;
}
.home h1 { font-size: clamp(1.9rem, 7vw, 2.6rem); }
.home .lede { font-size: 1.05rem; color: var(--ink-soft); max-width: 34ch; margin-inline: auto; }
.home .foot { margin-top: 42px; font-size: .85rem; color: var(--ink-soft); }
.home .foot a { color: var(--ink-soft); }

/* Small phones: keep a comfortable gutter and stop the slug row crowding. */
@media (max-width: 380px) {
  .wrap { padding-inline: 16px; }
  .card { padding: 18px; }
  .slug-prefix { font-size: .8rem; padding-left: 10px; }
}
