/* ydn.au — landing + admin.
   Palette matches the blog: navy #091e3b ground, cyan #00bceb accent.
   System fonts only, same call as the theme. */

:root {
  --ink:        #0b1220;
  --ink-soft:   #4a5568;
  --bg:         #f6f8fb;
  --surface:    #ffffff;
  --line:       #d9e0ea;
  --navy:       #091e3b;
  --accent:     #0072a3;
  --accent-ink: #ffffff;
  --danger:     #9b1c1c;
  --good:       #14532d;
  --good-bg:    #dcfce7;
  --bad-bg:     #fee2e2;
  --radius:     10px;
  --measure:    46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:        #e8eef7;
    --ink-soft:   #9fb0c7;
    --bg:         #091e3b;
    --surface:    #0f2b50;
    --line:       #1d3f6b;
    --navy:       #091e3b;
    --accent:     #00bceb;
    --accent-ink: #051426;
    --danger:     #fca5a5;
    --good:       #bbf7d0;
    --good-bg:    #14532d;
    --bad-bg:     #7f1d1d;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 2rem 1.25rem 4rem;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: var(--measure); margin: 0 auto; }
.wrap.narrow { max-width: 26rem; }
.center { text-align: center; }

a { color: var(--accent); }

/* ---- landing ---- */

.hero { margin: 2rem 0 2.5rem; }

.eyebrow {
  margin: 0 0 .4rem;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

h1 {
  margin: 0 0 .5rem;
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -.02em;
}

.tagline { margin: 0; color: var(--ink-soft); font-size: 1.05rem; }

.links { display: grid; gap: .75rem; margin: 0 0 3rem; }

.link-card {
  display: block;
  padding: .95rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s, transform .15s;
}

.link-card:hover,
.link-card:focus-visible { border-color: var(--accent); transform: translateY(-1px); }

.link-card.primary { border-left: 3px solid var(--accent); }

.lc-title { display: block; font-weight: 600; }
.lc-sub   { display: block; font-size: .875rem; color: var(--ink-soft); margin-top: .15rem; }

h2 { font-size: 1.05rem; letter-spacing: .01em; margin: 0 0 .9rem; }

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

.post-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  padding: .6rem 0;
  border-bottom: 1px solid var(--line);
}

.post-list a { text-decoration: none; }
.post-list a:hover { text-decoration: underline; }
.post-list time { color: var(--ink-soft); font-size: .8rem; white-space: nowrap; }

.more { margin: 1rem 0 0; font-size: .9rem; }
.more a { text-decoration: none; }

/* ---- interesting projects ----
   Partner sites, distinguished from the primary nav stack by being a grid
   rather than a column. Cards are anchors, so nothing here is a block wrapper
   fighting for its own centring. */

.projects { margin-top: 2.5rem; }

.section-sub {
  margin: -.5rem 0 1rem;
  color: var(--ink-soft);
  font-size: .875rem;
}

.project-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

/* The blurb takes the slack so hosts line up along the bottom edge whatever
   the card heights work out to. */
.link-card.project {
  display: flex;
  flex-direction: column;
  border-left: 3px solid var(--line);
}

.link-card.project:hover,
.link-card.project:focus-visible { border-left-color: var(--accent); }

.link-card.project .lc-sub { flex: 1 1 auto; }

.lc-host {
  display: block;
  margin-top: .55rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .78rem;
  color: var(--accent);
}

.foot {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: .8rem;
}

/* ---- admin ---- */

.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.inline { margin: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1.25rem 0;
}

label { display: block; font-size: .85rem; font-weight: 600; margin: .75rem 0 .25rem; }
.hint { font-weight: 400; color: var(--ink-soft); }

input[type=text], input[type=password] {
  width: 100%;
  padding: .55rem .7rem;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
}

input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

button {
  margin-top: 1rem;
  padding: .55rem 1.1rem;
  font: inherit;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
}

button.ghost  { background: transparent; color: var(--accent); }
button.danger { background: transparent; color: var(--danger); border-color: transparent; }

.flash { padding: .7rem .9rem; border-radius: 6px; font-size: .9rem; }
.flash.good { background: var(--good-bg); color: var(--good); }
.flash.bad  { background: var(--bad-bg);  color: var(--danger); }

.table-scroll { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }

tr.off { opacity: .55; }

td.code a { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-decoration: none; }
td.num  { text-align: right; font-variant-numeric: tabular-nums; }
td.when { color: var(--ink-soft); white-space: nowrap; }

.badge {
  display: inline-block; margin-left: .4rem; padding: 0 .35rem;
  font-size: .7rem; border: 1px solid var(--line); border-radius: 4px;
  color: var(--ink-soft);
}

.rowform { display: grid; gap: .35rem; min-width: 18rem; }
.rowform button { margin-top: .2rem; justify-self: start; padding: .3rem .7rem; font-size: .85rem; }
.chk { display: flex; align-items: center; gap: .35rem; font-weight: 400; margin: 0; }
.chk input { width: auto; }

.refs { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.refs li { display: flex; justify-content: space-between; padding: .35rem 0; border-bottom: 1px solid var(--line); }

.empty { color: var(--ink-soft); margin: 0; }

.token-reveal {
  margin: 0 0 1rem;
  padding: .7rem .8rem;
  background: var(--bg);
  border: 1px dashed var(--accent);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .85rem;
  overflow-x: auto;
  user-select: all;
}

.apihint { margin: 1rem 0 0; font-size: .82rem; color: var(--ink-soft); }
.apihint code {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .1rem .3rem;
  font-size: .95em;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
