/* Northern Rivers Jazz. Design from the approved prototype. */
  @font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('/assets/fonts/fraunces.woff2') format('woff2'); }
  @font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/assets/fonts/inter.woff2') format('woff2'); }

  :root {
    --paper: #FAF9F5; --panel: #FFFFFF; --border: #E6E2D8; --ink: #1B1A17;
    --muted: #7A7568; --teal: #1F5C4E; --teal-deep: #12332B; --gold: #C9A24B;
    --rust: #A4502F;
  }
  * { box-sizing: border-box; }
  body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'Inter', sans-serif; }
  a { color: var(--teal); }

  /* Header */
  .site-head { border-bottom: 1px solid var(--border); background: var(--paper); position: sticky; top: 0; z-index: 10; }
  .site-head .in { max-width: 1080px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .wordmark { font-family: 'Fraunces', serif; font-weight: 700; font-size: 20px; color: var(--teal-deep); text-decoration: none; letter-spacing: -0.01em; }
  .nav { display: flex; gap: 6px; }
  .nav a { padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none; border: 1px solid transparent; }
  .nav a.active { background: var(--teal); color: #fff; }
  .nav a:not(.active):hover { border-color: var(--border); }

  .wrap { max-width: 1080px; margin: 0 auto; padding: 44px 24px 64px; }
  .eyebrow { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal); font-weight: 600; margin-bottom: 10px; }
  h1.big { font-family: 'Fraunces', serif; font-weight: 700; font-size: clamp(36px, 6vw, 60px); line-height: 1.02; letter-spacing: -0.02em; margin: 0 0 18px; max-width: 820px; }
  .intro { font-size: 18px; line-height: 1.55; color: #3A3832; max-width: 640px; margin: 0 0 36px; }
  .intro p { margin: 0 0 12px; }
  h2.sec { font-family: 'Fraunces', serif; font-weight: 600; font-size: 28px; margin: 0 0 6px; }
  .section-label { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }

  /* Calculator */
  .controls-row { display: flex; flex-wrap: wrap; gap: 28px; margin-bottom: 24px; }
  .tabs { display: flex; flex-wrap: wrap; gap: 8px; }
  .tab { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel); color: var(--ink); font-size: 14px; font-weight: 500; cursor: pointer; font-family: 'Inter', sans-serif; }
  .tab.active { background: var(--teal); border-color: var(--teal); color: #fff; }
  .tab:disabled { opacity: .4; cursor: not-allowed; }
  .tab-note { font-size: 12px; color: var(--muted); margin-top: 6px; min-height: 16px; }

  .grid { display: grid; grid-template-columns: 1fr 1px 360px; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
  .inputs { padding: 28px 32px; }
  .field { margin-bottom: 22px; }
  .field-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; gap: 10px; }
  .field-head label { font-size: 14px; font-weight: 500; }
  .field-val { display: flex; align-items: baseline; gap: 2px; }
  .unit { color: var(--muted); font-size: 14px; }
  .field-val input[type="number"] { width: 92px; text-align: right; border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; font-family: 'Fraunces', serif; font-size: 16px; font-weight: 600; color: var(--teal-deep); background: #fff; }
  input[type="range"] { width: 100%; accent-color: var(--teal); }
  .flat-field { background: #F4F1E8; border-radius: 10px; padding: 14px 16px; margin: 0 -4px 22px; }
  .stats { margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .stat-label { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
  .stat-val { font-family: 'Fraunces', serif; font-weight: 600; font-size: 18px; color: var(--teal-deep); }
  .split-section { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
  .toggle-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
  .toggle-btn { padding: 6px 12px; border-radius: 7px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer; font-family: 'Inter', sans-serif; }
  .toggle-btn.active { background: var(--teal-deep); border-color: var(--teal-deep); color: #fff; }
  .helper { font-size: 12px; color: var(--muted); margin-top: 6px; }
  .perforation { background: var(--border); }
  .output { background: var(--teal-deep); color: #fff; padding: 28px 26px; display: flex; flex-direction: column; }
  .output .section-label { color: rgba(255,255,255,0.55); }
  .hero { font-family: 'Fraunces', serif; font-weight: 600; line-height: 1.05; color: var(--gold); word-break: break-word; }
  .hero-note { font-size: 13px; color: rgba(255,255,255,0.6); margin-top: 6px; }
  .compare { margin-top: 20px; background: rgba(255,255,255,0.06); border-radius: 10px; padding: 12px 14px; }
  .compare .verdict { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
  .compare .verdict.win { color: var(--gold); }
  .compare .verdict.lose { color: #E9A58A; }
  .row { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .row:last-child { border-bottom: none; }
  .row .k { color: rgba(255,255,255,0.65); }
  .row .v { font-family: 'Fraunces', serif; font-weight: 600; }
  .row.gold .v { color: var(--gold); }
  .payout { margin-top: 16px; }
  .payout .row:last-child { font-weight: 600; }
  .chart-box { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.14); }
  .chart-title { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 4px; }
  .legend { display: flex; gap: 14px; font-size: 11px; color: rgba(255,255,255,0.6); margin-bottom: 8px; }
  .legend i { display: inline-block; width: 14px; height: 0; border-top: 2px solid var(--gold); vertical-align: middle; margin-right: 5px; }
  .legend i.flat { border-top: 2px dashed rgba(255,255,255,0.7); }
  .chart-wrap { position: relative; touch-action: pan-y; }
  #chart { display: block; width: 100%; height: 140px; }
  #chart text { font-family: 'Inter', sans-serif; font-size: 10px; fill: rgba(255,255,255,0.5); }
  #tooltip { position: absolute; pointer-events: none; background: #0B201B; border: 1px solid rgba(255,255,255,0.2); color: #fff; font-size: 12px; padding: 5px 9px; border-radius: 6px; opacity: 0; transition: opacity .1s ease; transform: translate(-50%, -115%); white-space: nowrap; }
  .chart-hint { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 6px; }
  .formula { margin-top: 18px; font-size: 12px; color: var(--muted); text-align: center; }

  /* Sign-up */
  .signup { margin-top: 56px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 32px; }
  .signup p { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 0; }
  .form { display: grid; gap: 12px; }
  .form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .form label.lbl { font-size: 13px; font-weight: 500; display: block; margin-bottom: 4px; }
  .form input[type=text], .form input[type=email], .form input[type=url], .form input[type=date], .form input[type=time], .form select {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 15px; background: #fff; color: var(--ink);
  }
  .form input[type=file] { font-size: 14px; }
  .consent { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); }
  .consent input { margin-top: 3px; accent-color: var(--teal); }
  .btn { background: var(--teal); color: #fff; border: 0; border-radius: 999px; padding: 11px 22px; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; justify-self: start; }
  .btn:hover { background: var(--teal-deep); }
  .btn.ghost { background: transparent; color: var(--teal); border: 1px solid var(--teal); }
  .msg { font-size: 14px; min-height: 18px; }
  .msg.ok { color: var(--teal); font-weight: 500; }
  .msg.err { color: var(--rust); }
  .hp { position: absolute; left: -9999px; }

  /* Gig guide */
  .gig-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
  .filters { display: flex; gap: 8px; flex-wrap: wrap; }
  .month { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 600; margin: 30px 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
  .month:first-child { margin-top: 0; }
  .cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; position: relative; }
  .card .img { aspect-ratio: 4 / 5; background: #eee center / cover no-repeat; }
  .card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
  .card .date { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); }
  .card .title { font-family: 'Fraunces', serif; font-weight: 600; font-size: 18px; line-height: 1.15; margin: 2px 0; }
  .card .venue { font-size: 13px; color: var(--muted); }
  .card .more { margin-top: auto; padding-top: 8px; font-size: 13px; font-weight: 600; text-decoration: none; }
  .card .badge { position: absolute; top: 10px; left: 10px; background: var(--gold); color: var(--teal-deep); font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 4px; letter-spacing: .04em; text-transform: uppercase; }
  .empty { padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: 12px; }
  .add-gig { margin-top: 56px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 32px; }
  .add-gig p { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 0 0 10px; }
  .preview-thumb { width: 72px; aspect-ratio: 4/5; background: #f1efe8 center/cover; border-radius: 6px; border: 1px solid var(--border); }


  footer { border-top: 1px solid var(--border); }
  footer .in { max-width: 1080px; margin: 0 auto; padding: 22px 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }


  @media (max-width: 960px) { .cards { grid-template-columns: repeat(3, 1fr); } }
  @media (max-width: 760px) {
    .grid { grid-template-columns: 1fr; } .perforation { display: none; }
    .signup, .add-gig { grid-template-columns: 1fr; padding: 24px; }
    .cards { grid-template-columns: repeat(2, 1fr); }
    .inputs { padding: 24px 20px; }
  }
  @media (max-width: 460px) {
    .cards { grid-template-columns: 1fr; }
    .form .two { grid-template-columns: 1fr; }
    .site-head .in { padding: 12px 16px; } .wordmark { font-size: 17px; }
    .nav a { padding: 7px 10px; font-size: 13px; }
  }

  .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
  .card .img { background-size: cover; background-position: center; }
  .card .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .card .img.none { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; background: #eee; }
  .offline-note { display: none; background: var(--gold); color: var(--teal-deep); font-size: 13px; font-weight: 600; text-align: center; padding: 6px; }
  .offline-note.on { display: block; }
  .msg.err ul { margin: 0; padding-left: 18px; }
  .btn.danger { background: transparent; color: var(--rust); border: 1px solid #E4C3B6; }
  .btn.danger:hover { background: #fbf1ec; }
  .prose { max-width: 680px; font-size: 16px; line-height: 1.65; color: #3A3832; }
  .prose p { margin: 0 0 16px; }
  .link-note { font-size: 13px; color: var(--muted); }
  button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
  noscript .intro { color: var(--rust); }
  .gig-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
  .current-img { width: 96px; aspect-ratio: 4/5; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
  a.tab { text-decoration: none; display: inline-block; }
  a.tab:hover { border-color: var(--teal); }

  /* Gig page and sharing */
  .back { font-size: 14px; text-decoration: none; display: inline-block; margin-bottom: 22px; font-weight: 500; }
  .banner { background: #E8F0EC; color: var(--teal-deep); border: 1px solid #CFE0D7; padding: 12px 16px; border-radius: 10px; margin-bottom: 22px; font-weight: 500; font-size: 15px; }
  .gp { display: grid; grid-template-columns: 380px 1fr; gap: 44px; align-items: start; }
  .gp .poster { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); background: #eee; display: block; }
  .gp h1.big { font-size: clamp(32px, 5vw, 52px); margin-bottom: 12px; }
  .gp .meta { font-size: 18px; color: #3A3832; margin: 0 0 4px; }
  .gp .tickets { display: inline-block; margin-top: 18px; text-decoration: none; }
  .share { margin-top: 32px; padding-top: 26px; border-top: 1px solid var(--border); }
  .share h2.sec, h2.sec { font-family: 'Fraunces', serif; font-weight: 600; font-size: 28px; margin: 0 0 6px; }
  .share-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 14px; }
  .share-btn { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border); background: #fff; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; color: var(--ink); text-decoration: none; }
  .share-btn:hover { border-color: var(--teal); }
  .share-btn.primary { background: var(--teal); color: #fff; border-color: var(--teal); }
  .linkbox { display: flex; gap: 8px; max-width: 540px; }
  .linkbox input { flex: 1; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 14px; color: var(--muted); background: #fff; min-width: 0; }
  .share-help { font-size: 13px; color: var(--muted); margin: 6px 0 0; min-height: 18px; }
  .story { display: grid; grid-template-columns: 140px 1fr; gap: 20px; align-items: center; margin-top: 22px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px; max-width: 560px; }
  .story img { width: 140px; aspect-ratio: 9 / 16; height: auto; border-radius: 8px; background: #12332B; display: block; }
  .story h3, .og-wrap h3 { font-family: 'Fraunces', serif; font-size: 18px; font-weight: 600; margin: 0 0 6px; }
  .story .story-dl { margin-top: 10px; display: inline-block; text-decoration: none; }
  .og-wrap { margin-top: 22px; max-width: 560px; }
  .ogcard { max-width: 440px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; margin-top: 8px; }
  .ogcard img { width: 100%; height: auto; aspect-ratio: 1200 / 630; display: block; background: #12332B; }
  .ogcard .t { padding: 10px 12px; font-size: 13px; }
  .ogcard .t b { display: block; font-size: 14px; margin-bottom: 2px; }
  .ogcard .t span { color: var(--muted); font-size: 12px; }
  .more-gigs { margin-top: 56px; }
  .calc-cta { margin-top: 24px; font-size: 15px; }
  .card .title a { color: inherit; text-decoration: none; }
  .card a.img { display: block; }
  .gp .poster.none { display: flex; }
  @media (max-width: 860px) { .gp { grid-template-columns: 1fr; gap: 24px; } .gp .poster { max-width: 420px; } }

  /* Add a gig: image guide and crop warning */
  .img-spec { font-size: 13px; color: var(--muted); margin: 6px 0 0; line-height: 1.45; }
  .img-spec b { color: var(--ink); font-weight: 600; }
  .img-warn { font-size: 13px; color: var(--rust); margin: 4px 0 0; }
  .img-warn:empty { display: none; }
  .add-gig .img-warn { color: var(--rust); margin: 4px 0 0; } /* the brief asks for rust; .add-gig p would otherwise grey it */

  /* Instagram handle field */
  .at-wrap { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
  .at-wrap span { padding: 0 2px 0 12px; color: var(--muted); font-size: 15px; }
  .form .at-wrap input[type=text] { border: 0; padding-left: 2px; background: transparent; }
  .form .at-wrap input[type=text]:focus { outline: none; }
  .at-wrap:focus-within { outline: 2px solid var(--teal); outline-offset: 2px; }

  /* One-tap posting panel */
  .post-panel { max-width: 640px; }
  .post-gig { font-size: 17px; line-height: 1.5; margin: 0 0 18px; }
  .post-list { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
  .post-list li { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
  .post-plat { font-weight: 600; min-width: 140px; }
  .post-why { color: var(--rust); font-size: 14px; }
  .post-caption { white-space: pre-wrap; font: inherit; font-size: 15px; line-height: 1.5; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin: 0 0 18px; }
  .post-imgs { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
  .post-imgs img { border-radius: 8px; border: 1px solid var(--border); height: auto; }
