:root {
  --navy: #1d3b3a;      /* dark navy green */
  --navy-2: #284f4d;
  --ink: #17262a;
  --blue: #a9d3ea;      /* light blue */
  --blue-soft: #e6f2f9;
  --beige: #f1e7d3;
  --beige-soft: #faf6ee;
  --white: #ffffff;
  --muted: #5d6d6f;
  --line: #e4e0d6;
  --danger: #a33a2c;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(23,38,42,.06), 0 8px 24px rgba(23,38,42,.07);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--white); line-height: 1.6; font-size: 17px; }
img { max-width: 100%; display: block; }
a { color: var(--navy); }
h1, h2, h3 { font-family: var(--serif); font-weight: 650; line-height: 1.15; color: var(--navy); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
h1 em, .brand em, .footer-brand em { font-style: italic; font-weight: 500; color: var(--navy-2); }
.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(720px, 100% - 2.5rem); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 600; color: var(--navy-2); margin: 0 0 .6rem; }
.lead { font-size: 1.15rem; color: #3c4d50; max-width: 40rem; }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-family: var(--serif); font-weight: 650; font-size: 1.2rem; color: var(--navy); }
.nav-links { display: flex; gap: .3rem; }
.nav-links a { text-decoration: none; padding: .45rem .85rem; border-radius: 999px; font-weight: 500; font-size: .95rem; color: var(--ink); }
.nav-links a:hover { background: var(--blue-soft); }
.nav-links a.active { background: var(--navy); color: var(--white); }
.nav-links .nav-admin { border: 1px dashed var(--navy-2); }
.nav-toggle, .nav-burger { display: none; }
@media (max-width: 760px) {
  .nav-burger { display: flex; flex-direction: column; gap: 5px; cursor: pointer; padding: 10px; }
  .nav-burger span { width: 22px; height: 2px; background: var(--navy); border-radius: 2px; }
  .nav-links { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: var(--white); padding: .5rem 1.25rem 1rem; border-bottom: 1px solid var(--line); display: none; }
  .nav-links a { padding: .8rem 1rem; }
  .nav-toggle:checked ~ .nav-links { display: flex; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .75rem 1.3rem; border-radius: 999px; font: 600 .95rem var(--sans); text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-2); box-shadow: 0 6px 16px rgba(29,59,58,.25); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--blue-soft); }
.btn-danger { background: transparent; color: var(--danger); border-color: #e5c4bd; }
.btn-small { padding: .4rem .85rem; font-size: .85rem; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; }

/* hero */
.hero { position: relative; background: linear-gradient(160deg, var(--beige) 0%, var(--beige-soft) 45%, var(--blue-soft) 100%); padding: clamp(4rem, 10vw, 7.5rem) 0 clamp(5rem, 11vw, 8.5rem); overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -120px; top: -80px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, var(--blue) 0%, transparent 70%); opacity: .55; }
.hero-inner { position: relative; z-index: 1; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }
.hero-wave { position: absolute; bottom: -1px; left: 0; width: 100%; height: 60px; }

.page-head { background: linear-gradient(160deg, var(--beige) 0%, var(--beige-soft) 60%, var(--blue-soft) 100%); padding: clamp(3rem, 7vw, 5rem) 0 clamp(2.5rem, 5vw, 3.5rem); border-bottom: 1px solid var(--line); }
.page-head.slim { padding: 2.5rem 0; }
.page-head .btn { margin-top: 1rem; }
.page-head.center { text-align: center; }
.page-head.center .lead { margin-inline: auto; }

/* sections */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-beige { background: var(--beige-soft); border-block: 1px solid var(--line); }
.section-blue { background: var(--blue-soft); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.section-head h2 { margin: 0; }
.more { font-weight: 600; text-decoration: none; color: var(--navy); white-space: nowrap; }
.more:hover { text-decoration: underline; }
.empty { padding: 2rem; background: var(--beige-soft); border-radius: var(--radius); text-align: center; color: var(--muted); }

/* post cards */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.6rem; }
.post-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(23,38,42,.06), 0 16px 32px rgba(23,38,42,.1); }
.post-card-img { aspect-ratio: 16 / 9; background: var(--blue-soft); display: block; overflow: hidden; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; }
.post-card-img.no-img { display: grid; place-items: center; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, #3d6b73 100%); text-decoration: none; }
.post-card-img.no-img span { font-family: var(--serif); font-size: 3.4rem; color: var(--beige); opacity: .9; }
.post-card-body { padding: 1.25rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.post-card-body h3 a { text-decoration: none; color: var(--navy); }
.post-card-body h3 a:hover { text-decoration: underline; }
.post-card-body p { margin: 0 0 1rem; color: #3c4d50; }
.post-card-body .more { margin-top: auto; }
.meta { font-size: .82rem; color: var(--muted); margin: 0 0 .5rem; }
.meta a { color: var(--navy-2); }

/* pick cards */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.6rem; }
.pick-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.pick-img { position: relative; aspect-ratio: 4 / 3; background: var(--beige); }
.pick-img img { width: 100%; height: 100%; object-fit: cover; }
.tag { position: absolute; top: .8rem; left: .8rem; background: var(--white); color: var(--navy); font-size: .75rem; font-weight: 600; padding: .25rem .7rem; border-radius: 999px; box-shadow: var(--shadow); }
.pick-body { padding: 1.25rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.pick-body p { color: #3c4d50; margin: 0 0 1.2rem; }
.pick-body .btn { margin-top: auto; align-self: flex-start; }
.disclosure { font-size: .85rem; margin-top: 2.5rem; text-align: center; }

/* article */
.article-head { padding: clamp(2.5rem, 6vw, 4rem) 0 1.5rem; }
.article-cover { margin: 0 auto 2rem; }
.article-cover img { width: 100%; max-height: 520px; object-fit: cover; border-radius: var(--radius); }
.draft-flag { display: inline-block; background: var(--beige); color: var(--navy); font-weight: 600; font-size: .85rem; padding: .3rem .8rem; border-radius: 999px; }
.prose { font-size: 1.08rem; padding-bottom: 3rem; }
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.6rem; }
.prose img { border-radius: 12px; margin: 1.5rem 0; height: auto; }
.prose blockquote { margin: 1.5rem 0; padding: .8rem 1.4rem; border-left: 4px solid var(--blue); background: var(--blue-soft); border-radius: 0 12px 12px 0; }
.prose a { color: var(--navy-2); text-underline-offset: 3px; }
.prose code { background: var(--beige-soft); padding: .1rem .35rem; border-radius: 6px; font-size: .92em; }
.prose pre { background: var(--ink); color: #eef; padding: 1rem; border-radius: 12px; overflow-x: auto; }
.prose pre code { background: none; }

/* about */
.about { display: grid; gap: 2.5rem; max-width: 820px; }
.about.has-photo { grid-template-columns: 260px 1fr; max-width: 1000px; align-items: start; }
.about-photo { margin: 0; }
.about-photo img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; box-shadow: 0 0 0 8px var(--beige), var(--shadow); }
@media (max-width: 720px) { .about.has-photo { grid-template-columns: 1fr; } .about-photo { max-width: 260px; } }

/* footer */
.site-footer { background: var(--navy); color: #dfe9e7; padding: 3rem 0 1.5rem; }
.site-footer .muted { color: #a8bebb; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; }
.footer-brand { font-family: var(--serif); font-size: 1.3rem; color: var(--white); margin: 0 0 .3rem; }
.footer-brand em { color: var(--blue); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; }
.footer-links a, .footer-links .linklike { color: var(--white); text-decoration: none; font-weight: 500; }
.footer-links a:hover { color: var(--blue); }
.footer-links form { margin: 0; }
.footer-base { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2rem; padding-top: 1.2rem; font-size: .85rem; }

/* admin */
.auth-card { max-width: 440px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 2rem; }
.form { display: grid; gap: 1.1rem; }
.form label { display: grid; gap: .35rem; font-weight: 600; font-size: .92rem; color: var(--navy); }
.form label .muted { font-weight: 400; }
.form input[type=text], .form input[type=password], .form input[type=number], .form textarea { width: 100%; font: 400 1rem var(--sans); padding: .75rem .9rem; border: 1.5px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--navy-2); box-shadow: 0 0 0 3px var(--blue-soft); }
.form input[type=file] { font: inherit; font-weight: 400; }
.input-title { font-family: var(--serif) !important; font-size: 1.5rem !important; }
.form-row { display: grid; grid-template-columns: 2fr 2fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.form-actions { display: flex; flex-wrap: wrap; gap: .75rem; padding-top: .5rem; }
.img-field { border: 1.5px dashed var(--line); border-radius: 12px; padding: 1rem 1.2rem; display: grid; gap: .8rem; }
.img-field legend { font-weight: 600; color: var(--navy); padding: 0 .4rem; }
.current-img { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.current-img img { width: 140px; height: 100px; object-fit: cover; border-radius: 10px; }
.check { display: flex !important; align-items: center; gap: .4rem; font-weight: 400 !important; }
.hint { margin: -.5rem 0 0; font-size: .85rem; color: var(--muted); }
.editor-wrap { max-width: 860px; }
.editor { border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--white); }
.editor-bar { display: flex; flex-wrap: wrap; gap: .25rem; padding: .5rem; background: var(--beige-soft); border-bottom: 1px solid var(--line); }
.editor-bar button, .bar-upload { font: 500 .88rem var(--sans) !important; color: var(--navy) !important; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: .35rem .7rem; cursor: pointer; display: inline-block !important; }
.editor-bar button:hover, .bar-upload:hover { background: var(--blue-soft); }
.bar-spacer { flex: 1; }
.bar-toggle { background: var(--navy) !important; color: var(--white) !important; border-color: var(--navy) !important; }
.editor textarea { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; min-height: 360px; line-height: 1.7; resize: vertical; }
.preview { padding: 1rem 1.4rem; min-height: 360px; }
.alert { padding: .8rem 1.1rem; border-radius: 10px; font-weight: 500; }
.alert-ok { background: var(--blue-soft); color: var(--navy); }
.alert-error { background: #fbe9e5; color: var(--danger); }
.table { display: grid; gap: .6rem; margin-bottom: 2.5rem; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.row-main { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; min-width: 0; }
.row-title { font-weight: 600; text-decoration: none; }
.row-thumb { width: 48px; height: 36px; object-fit: cover; border-radius: 6px; }
.row-actions { display: flex; gap: .4rem; }
.row-actions form { margin: 0; }
.badge { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: .2rem .55rem; border-radius: 999px; }
.badge-live { background: var(--blue); color: var(--navy); }
.badge-draft { background: var(--beige); color: #7a5b2a; }

/* connections */
.key-box { background: var(--blue-soft); border: 1.5px solid var(--blue); border-radius: 12px; padding: 1rem 1.2rem; margin-bottom: 1.5rem; }
.key-box p { margin-top: 0; }
.copy-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .6rem; }
.copy-row code, .conn-card code { background: var(--white); border: 1px solid var(--line); padding: .45rem .6rem; border-radius: 8px; font-size: .85rem; word-break: break-all; }
.inline-form { grid-template-columns: 1fr auto; align-items: end; margin-bottom: 2rem; }
@media (max-width: 640px) { .inline-form { grid-template-columns: 1fr; } }
.conn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.2rem; margin-bottom: 2rem; }
.conn-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; background: var(--beige-soft); }
.conn-card p { margin: .4rem 0; }
.examples { padding-left: 1.2rem; color: #3c4d50; }
.examples li { margin-bottom: .4rem; }
