/* Halfpenny — look 2: vibrant. One stylesheet, no scripts, system fonts only. */

:root {
  --paper: #fbf8f3;
  --card: #ffffff;
  --ink: #16130f;
  --accent: #e4601f;      /* copper-orange */
  --accent-2: #0f7c6f;    /* teal, for theme tags */
  --on-accent: #ffffff;
  --muted: #6e665c;
  --rule: #e6ded2;
  --shadow: 0 6px 20px rgba(22,19,15,0.07);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: Charter, "Iowan Old Style", Georgia, "Times New Roman", serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14110e; --card: #1e1a15; --ink: #f4efe7;
    --accent: #ff8a47; --accent-2: #3fc3b0; --on-accent: #16130f;
    --muted: #a69d90; --rule: #332d26; --shadow: 0 6px 20px rgba(0,0,0,0.35);
  }
}
.light { --paper: #fbf8f3; --card: #ffffff; --ink: #16130f; --accent: #e4601f; --accent-2: #0f7c6f; --on-accent: #ffffff; --muted: #6e665c; --rule: #e6ded2; --shadow: 0 6px 20px rgba(22,19,15,0.07); }
.dark  { --paper: #14110e; --card: #1e1a15; --ink: #f4efe7; --accent: #ff8a47; --accent-2: #3fc3b0; --on-accent: #16130f; --muted: #a69d90; --rule: #332d26; --shadow: 0 6px 20px rgba(0,0,0,0.35); }

html { background: var(--paper); color: var(--ink); }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.6; background: var(--paper); color: var(--ink); -webkit-text-size-adjust: 100%; }
@media (min-width: 700px) { body { font-size: 18px; } }
.wrap { max-width: 46rem; margin: 0 auto; padding: 0 16px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.15em; }

h1, h2, h3 { font-family: var(--sans); font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; margin: 1.5em 0 0.4em; }
h1 { font-size: 2.4rem; }
@media (min-width: 700px) { h1 { font-size: 3rem; } }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.lede { font-size: 1.2rem; color: var(--muted); }
blockquote { margin: 1.4em 0; padding: 1em 1.2em; border-left: 4px solid var(--accent); background: var(--card); border-radius: 0 12px 12px 0; font-family: var(--serif); font-size: 1.1rem; }
small, .meta { font-size: 0.85rem; color: var(--muted); }

.tag { display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-2); }

.table { overflow-x: auto; margin: 1.2em 0; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; }
table { border-collapse: collapse; font-size: 0.92rem; width: 100%; }
th, td { text-align: left; padding: 0.6em 0.9em; border-bottom: 1px solid var(--rule); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-weight: 700; background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
td:last-child, th:last-child { white-space: nowrap; }

.mark { display: inline-block; color: var(--accent); vertical-align: middle; }
.mark svg { display: block; width: 100%; height: 100%; }

.site-head { display: flex; align-items: center; gap: 0.6rem; padding: 1rem 0; }
.site-head .mark { width: 36px; height: 36px; }
.site-head .name { font-weight: 800; font-size: 1.2rem; color: var(--ink); letter-spacing: -0.01em; }
.site-head nav { margin-left: auto; font-size: 0.92rem; font-weight: 600; }
.site-head nav a { margin-left: 1.1rem; color: var(--ink); }
.site-head nav a:hover { color: var(--accent); text-decoration: none; }

/* Hero */
.hero { background: var(--ink); color: var(--paper); border-radius: 20px; padding: 2.2rem 1.6rem; margin: 0.5rem 0 2rem; position: relative; overflow: hidden; }
@media (min-width: 700px) { .hero { padding: 3rem 2.4rem; } }
.hero .mark { width: 72px; height: 72px; margin-bottom: 1rem; }
.hero h1 { margin: 0 0 0.4em; color: var(--paper); }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { font-size: 1.1rem; max-width: 34rem; color: color-mix(in srgb, var(--paper) 80%, var(--ink)); margin-bottom: 1.4rem; }
.hero .cta { display: inline-block; background: var(--accent); color: var(--on-accent); font-weight: 700; padding: 0.7em 1.2em; border-radius: 999px; }
.hero .cta:hover { text-decoration: none; filter: brightness(1.08); }
.hero::after { content: "½"; position: absolute; right: -0.1em; bottom: -0.45em; font-family: var(--serif); font-weight: 700; font-size: 14rem; line-height: 1; color: var(--accent); opacity: 0.12; pointer-events: none; }

/* Cards */
.cards { display: grid; gap: 1rem; grid-template-columns: 1fr; list-style: none; padding: 0; margin: 1rem 0 2rem; }
@media (min-width: 700px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { background: var(--card); border: 1px solid var(--rule); border-radius: 16px; padding: 1.2rem 1.3rem; box-shadow: var(--shadow); transition: transform .15s ease; }
.card:hover { transform: translateY(-2px); }
.card h3 { margin: 0.4rem 0 0.4rem; font-size: 1.2rem; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--accent); text-decoration: none; }
.card p { margin: 0 0 0.6rem; font-size: 0.95rem; color: var(--muted); }

/* Newsletter */
.newsletter { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #c2185b)); color: var(--on-accent); border-radius: 20px; padding: 1.6rem 1.5rem; margin: 2rem 0; }
.newsletter strong { font-size: 1.25rem; font-weight: 800; display: block; margin-bottom: 0.2rem; }
.newsletter form { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.8rem 0 0.5rem; }
.newsletter input { flex: 1 1 14rem; font: inherit; padding: 0.7em 0.9em; border: 0; border-radius: 999px; background: rgba(255,255,255,0.92); color: #16130f; }
.newsletter button { font: inherit; font-weight: 700; padding: 0.7em 1.3em; border: 0; border-radius: 999px; background: #16130f; color: #fff; }
.newsletter button[disabled] { opacity: 0.7; cursor: not-allowed; }
.newsletter .meta { color: color-mix(in srgb, var(--on-accent) 85%, transparent); }

.site-foot { border-top: 1px solid var(--rule); margin-top: 3rem; padding: 1.5rem 0 3rem; font-size: 0.85rem; color: var(--muted); }

/* Piece body uses the serif for long reading */
.piece p, .piece li { font-family: var(--serif); font-size: 1.08rem; line-height: 1.6; }

/* Template pieces */
.site-head .brand { display: flex; align-items: center; gap: 0.6rem; color: var(--ink); }
.site-head .brand:hover { text-decoration: none; }
h2.section { margin-top: 0.5rem; }
.notice { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); border: 1px dashed var(--rule); border-radius: 10px; padding: 0.5em 0.8em; }
.piece .meta { font-family: var(--sans); }
.piece h2 { margin-top: 1.8em; }
.piece h1 { margin-top: 0.3em; }
.piece .notice { font-family: var(--sans); }
.piece hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
tr.total td { font-weight: 700; border-top: 2px solid var(--rule); }
.links { text-align: center; padding: 2rem 0 1rem; }
.links .mark { margin: 0 auto 0.5rem; }
.links h1 { margin: 0.2em 0; }
.linklist { list-style: none; padding: 0; margin: 1.5rem auto 0; max-width: 26rem; }
.linklist li { margin: 0.6rem 0; }
.linklist a { display: block; padding: 0.9em 1em; border: 1px solid var(--rule); border-radius: 14px; background: var(--card); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.linklist a:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }
main > h1:first-child { margin-top: 1rem; }

/* Narrow screens: the header wraps instead of clipping; links inside the orange box stay readable. */
.site-head { flex-wrap: wrap; }
@media (max-width: 460px) {
  .site-head nav { margin-left: 0; width: 100%; display: flex; gap: 1rem; }
  .site-head nav a { margin-left: 0; }
}
.newsletter a { color: var(--on-accent); text-decoration: underline; text-underline-offset: 0.15em; }
