/* Coase's public rules page, in coaseadvisory.com's own look (decision 71 §10a): its header,
   footer, fonts, colours and spacing, taken from site/index.html (the 1200px width, 32px sides,
   the Newsreader and IBM Plex Sans stacks, cream #F1EFEA, ink #1F2421, green #2D4A3E, the
   white 10px cards with a #DCD8CF border, 12px by 18px buttons). */
:root {
  --cream: #F1EFEA; --white: #FFFFFF; --ink: #1F2421; --ink-2: #5B5F59; --ink-lead: #4A4F49;
  --line: #DCD8CF; --rule: #ECE8DF; --green: #2D4A3E; --green-dark: #1C3027; --brass: #C9A35C;
  --dash: #8A8F88;
  --sans: 'IBM Plex Sans', 'Helvetica Neue', sans-serif;
  --serif: 'Newsreader', Georgia, serif;
  color-scheme: light;
}
* , *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.55; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }

/* The website's header and footer, as site/index.html draws them. */
.site-header { background: var(--cream); border-bottom: 1px solid var(--line); line-height: normal; }
.header-row { padding-top: 18px; padding-bottom: 18px; display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand span { font-family: var(--serif); font-size: 26px; font-weight: 500; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; font-size: 15px; }
.nav a { text-decoration: none; }
.nav a.current { font-weight: 600; box-shadow: inset 0 -2px 0 var(--green); }
.nav a.demo { background: var(--green); color: var(--white); padding: 12px 18px; border-radius: 6px; font-weight: 500; }
.nav a.demo:hover { background: var(--green-dark); }
.site-footer { border-top: 1px solid var(--line); margin-top: 72px; }
.footer-row { padding-top: 28px; padding-bottom: 28px; display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: 12px; font-size: 14px; color: var(--ink-2); }

.button { border: 1px solid var(--green); background: var(--white); color: var(--green); text-decoration: none;
  border-radius: 6px; padding: 12px 18px; font: inherit; font-weight: 500; font-size: 15px; min-height: 44px;
  display: inline-flex; align-items: center; cursor: pointer; }
.button.primary { background: var(--green); color: var(--white); }
.button:hover { border-color: var(--green-dark); }
.button.primary:hover { background: var(--green-dark); color: var(--white); }
.link-button { border: none; background: none; color: var(--green); font: inherit; font-size: 14px; cursor: pointer;
  text-decoration: underline; min-height: 40px; padding: 0 4px; }

.intro { padding-top: 80px; padding-bottom: 40px; }
.intro h1 { margin: 0 0 20px; font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 5vw, 58px);
  line-height: 1.06; letter-spacing: -0.01em; max-width: 820px; }
.intro p { margin: 0; }
.intro .lead { font-size: 20px; line-height: 1.5; color: var(--ink-lead); max-width: 680px; }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 0; margin: 22px 0 0; padding: 0; font-size: 14px; color: var(--ink); }
.facts li { display: inline-flex; align-items: center; }
.facts li + li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--brass); margin: 0 14px; }
.intro .note { margin-top: 14px; font-size: 13px; line-height: 1.5; color: var(--ink-2); max-width: 680px; }

.panel { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 24px 28px; }
.controls { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: flex-end; justify-content: space-between; }
.pick { flex: 1 1 440px; min-width: 0; }
.label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { border: 1px solid var(--green); background: var(--green); color: var(--white); border-radius: 999px;
  padding: 8px 14px 8px 16px; font: inherit; font-size: 15px; cursor: pointer; min-height: 44px; }
.chip span { opacity: 0.7; margin-left: 4px; }
#search { flex: 1 1 200px; min-width: 180px; border: 1px dashed var(--dash); border-radius: 999px; padding: 10px 16px;
  font: inherit; font-size: 15px; background: var(--white); min-height: 44px; color: var(--ink); }
.list { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px; max-height: 260px; overflow-y: auto; }
.list button { display: flex; justify-content: space-between; align-items: center; border: none; background: var(--cream);
  border-radius: 6px; padding: 8px 12px; font: inherit; font-size: 15px; color: var(--ink); cursor: pointer;
  text-align: left; min-height: 44px; gap: 8px; }
.list button span:last-child { color: var(--green); font-weight: 600; white-space: nowrap; }
.list .none { padding: 8px; color: var(--ink-2); font-size: 14px; }
select, input[type="date"] { font: inherit; font-size: 15px; color: var(--ink); border: 1px solid var(--line); border-radius: 6px;
  padding: 10px 12px; min-width: 200px; min-height: 44px; background: var(--white); }
.actions { display: flex; gap: 10px 24px; flex-wrap: wrap; align-items: center; }
.quiet-links { display: flex; gap: 20px; flex-wrap: wrap; font-size: 15px; }
.quiet-links a { min-height: 44px; display: inline-flex; align-items: center; }

.calendar-panel { margin-top: 16px; }
.calendar-panel .lead { margin: 0 0 10px; }
.feed { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 0; border-top: 1px solid var(--rule); }
.feed > span:first-child { font-weight: 600; }
.feed .links { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.small { font-size: 14px; color: var(--ink-2); margin: 12px 0 0; }

/* Cards side by side share their row's height, so the gap down each column is the same 24px
   (the rulebook's I12: a short card beside a tall one left a hole of up to 186px). */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); gap: 24px; align-items: stretch; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 28px;
  display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.card h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.2; }
.card-head .checked { font-size: 13px; color: var(--ink-2); }
.card h3 { font-size: 18px; font-weight: 600; margin: 0 0 10px; }
.card h3.with-note { margin-bottom: 4px; }
.year-note { font-size: 14px; color: var(--ink-2); margin-bottom: 10px; }
.row { padding: 12px 0; border-top: 1px solid var(--rule); overflow-wrap: anywhere; }
.row.dated { display: grid; grid-template-columns: 116px 1fr; gap: 14px; }
.date-notes { font-size: 13px; color: var(--ink-2); margin: 2px 0 4px; }
.when { font-weight: 600; color: var(--green); }
.when small { display: block; font-weight: 400; color: var(--ink-2); font-size: 13px; }
.source { margin-top: 2px; font-size: 13px; color: var(--ink-2); }
.source .nowrap { white-space: nowrap; }
.also-line { margin-top: 6px; }
.line-note { margin-top: 2px; font-size: 14px; color: var(--ink-2); }
.rec-line { margin-top: 4px; font-size: 14px; }
.rec-line .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brass); margin-right: 6px; }
.rec-line b { font-weight: 600; }
.card-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px;
  border-top: 1px solid var(--line); padding-top: 16px; }
.card-foot .left { display: flex; gap: 16px; flex-wrap: wrap; }
.empty { color: var(--ink-2); }

.closing { margin-top: 56px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 28px; }
.closing h3 { margin: 0 0 8px; font-size: 18px; font-weight: 600; }
.closing p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ink-lead); }

/* Phones: the website's own 32px sides and header, as it draws them at 390; only the panels'
   insides are tighter, so a country's lines keep their room. */
@media (max-width: 640px) {
  .intro { padding-top: 40px; padding-bottom: 28px; }
  .intro .lead { font-size: 17px; }
  .facts { font-size: 13px; }
  .panel { padding: 16px; }
  .card { padding: 18px; }
  /* 104px: the "Recommended" tag (99.5px in the page's own font) fits whole (rulebook I12). */
  .row.dated { grid-template-columns: 104px 1fr; gap: 10px; }
  .actions .button, .year, .year input { width: 100%; }
}

.ob-title { font-weight: 600; margin-bottom: 2px; }
.ob-when { margin-top: 6px; }
.card > .year-note { margin: -6px 0 14px; color: var(--ink-2); font-size: 14px; }

/* Your deadlines: one list across the chosen countries, in date order */
.timeline { margin: 32px 0 40px; }
.tl-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 8px; }
.timeline h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.2; }
.tl-top .small { margin: 0; }
.tl-month { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); margin: 28px 0 10px; }
.tl-group { list-style: none; margin: 0; padding: 0; background: var(--white); border: 1px solid var(--line); border-radius: 10px; }
.tl-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center; padding: 16px 20px; }
.tl-item + .tl-item { border-top: 1px solid var(--rule); }
.tl-day { text-align: center; border-radius: 8px; background: var(--cream); padding: 6px 0; line-height: 1.1; }
.tl-day b { display: block; font-family: var(--serif); font-weight: 500; font-size: 24px; }
.tl-day span { font-size: 12px; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.05em; }
.tl-item.soon .tl-day { background: var(--green); color: var(--white); }
.tl-item.soon .tl-day span { color: #CFDAD4; }
.tl-item.past { opacity: 0.55; }
.tl-what { font-size: 16px; font-weight: 500; }
.tl-country { display: inline-block; font-weight: 600; margin-right: 8px; color: var(--green); }
.tl-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.tl-item.soon .tl-until { color: var(--green); font-weight: 600; }
.tl-add { font-size: 14px; white-space: nowrap; text-decoration: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; min-height: 36px; display: inline-flex; align-items: center; }
.tl-add:hover { border-color: var(--green); }
@media (max-width: 560px) {
  .tl-item { grid-template-columns: 48px 1fr auto; gap: 12px; padding: 14px 14px; }
  .tl-add { padding: 6px 10px; font-size: 13px; }
  .tl-what { font-size: 15px; }
  .timeline h2 { font-size: 26px; }
}
.tl-tag { display: inline-block; margin-left: 10px; font-size: 12px; font-weight: 600; color: #8A6A2E; background: #C9A35C26;
  border-radius: 999px; padding: 2px 10px; vertical-align: 2px; }
.tl-item.rec .tl-day { background: #C9A35C26; color: var(--ink); }
.tl-item.rec.soon .tl-day span { color: var(--ink-2); }
.tl-toggle { margin: 4px 0 0; padding: 6px 0; }
.tl-item.past { grid-template-columns: 56px 1fr; }
@media (max-width: 560px) { .tl-country { display: block; margin: 0 0 2px; } }
.card-year { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.card-year .fy { white-space: nowrap; }
.card-year input[type="date"] { min-width: 0; padding: 6px 8px; min-height: 36px; font-size: 14px; }
.when.rec-when { color: #8A6A2E; }
.when .tag { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 600; color: #8A6A2E; background: #C9A35C26;
  border-radius: 999px; padding: 1px 8px; }
.tl-item.undated { grid-template-columns: 56px 1fr; }
.tl-item.undated .tl-day { background: none; color: var(--ink-2); font-size: 18px; }
.tl-item.past .tl-until { font-weight: 600; }
@media (max-width: 560px) { .tl-item.undated { grid-template-columns: 48px 1fr; } }
.year { display: flex; flex-direction: column; align-items: flex-start; }
.ye-toggle { margin-top: 8px; padding: 4px 0; }
.ye-list { flex-basis: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 8px 24px;
  border-top: 1px solid var(--rule); padding-top: 16px; }
.ye-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; font-size: 15px; }
.ye-row input[type="date"] { min-width: 0; padding: 6px 8px; min-height: 40px; }
.ye-fy { font-size: 13px; color: var(--ink-2); min-width: 52px; }
.when.nodate { color: var(--ink-2); font-weight: 400; }
.fy-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fy-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--cream); }
.fy-chip { border: none; background: none; font: inherit; font-size: 14px; padding: 8px 14px; border-radius: 999px; cursor: pointer; color: var(--ink-2); min-height: 36px; }
.fy-chip.on { background: var(--green); color: var(--white); font-weight: 600; }
.fy-warn { margin-top: 10px; font-size: 14px; background: #C9A35C1F; border-left: 3px solid var(--brass); padding: 8px 12px; border-radius: 4px; }
.fy-skip { margin: 4px 0 0; }
@media (max-width: 560px) {
  .facts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
  .facts li { align-items: baseline; }
  .facts li::before, .facts li + li::before { content: ""; flex: none; width: 4px; height: 4px; border-radius: 50%; background: var(--brass); margin: 0 8px 0 0; position: relative; top: -2px; }
}
.tl-top { align-items: flex-end; }
.tl-cal { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.tl-cal .small { margin: 0; font-size: 12px; text-align: right; max-width: 260px; }
.ye-row { grid-template-columns: 1fr auto; }
@media (max-width: 560px) {
  .tl-cal { align-items: stretch; width: 100%; margin-top: 10px; }
  .tl-cal .button { text-align: center; }
  .tl-cal .small { text-align: left; max-width: none; }
}
.tl-top { align-items: center; }
.tl-cal .button { display: inline-flex; justify-content: center; align-items: center; }

/* Controls as a grid: the countries left, the year end right, both from the top; the rest full width below */
.controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 40px; row-gap: 20px; align-items: start; }
.controls .pick { grid-column: 1; }
.controls .year { grid-column: 2; }
.controls .ye-list, .controls .actions { grid-column: 1 / -1; }
@media (max-width: 860px) {
  .controls { grid-template-columns: minmax(0, 1fr); }
  .controls .year { grid-column: 1; }
}
/* Your deadlines: the heading and its note left, the one button right, centred on the heading */
.tl-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; }
.tl-cal { flex-direction: row; align-items: center; }
.tl-cal .small { display: none; }
.tl-help { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-2); }
@media (max-width: 560px) {
  .tl-cal { width: 100%; }
  .tl-cal .button { width: 100%; }
}
