/* ReeceLarkin.com, version 3 ("Results")
   The site laid out as a page of search results about Reece Larkin: a yellow header with
   his name in a search field, pages as tabs, sections as results, a facts panel beside them. */

:root {
  color-scheme: light;
  --yellow: #ffd60a;
  --yellow-deep: #e0b400;
  --ink: #17171c;
  --body: #34343c;
  --muted: #62626c;
  --line: #dcdcd6;
  --wash: #f5f5f1;
  --field: #84848d;
  --error: #a3160f;
  --font: "Schibsted Grotesk", "Segoe UI", Arial, sans-serif;
  --wrap: 1160px;
  --gutter: 24px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--body);
  font: 400 1.0625rem/1.55 var(--font);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h2 {
  font-size: 1.4rem;
}

h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.005em;
}

p,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: var(--ink);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}

a:hover {
  background: var(--yellow);
}

mark {
  margin: 0 -0.04em;
  padding: 0 0.14em;
  border-radius: 5px;
  background: var(--yellow);
  color: inherit;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.wrap {
  width: min(100% - var(--gutter) * 2, var(--wrap));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 10;
  padding: 12px 18px;
  background: var(--ink);
  color: #fff;
}

.skip:focus {
  left: 0;
}

.meta {
  color: var(--muted);
  font-size: 0.96rem;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: 650 1rem/1.2 var(--font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.btn:hover {
  background: var(--yellow);
}

.btn--ink {
  background: var(--ink);
  color: #fff;
}

.btn--ink:hover {
  background: #fff;
  color: var(--ink);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--ink:disabled:hover {
  background: var(--ink);
  color: #fff;
}

/* ---------- Header: the search field and the tabs ---------- */

.top {
  background: var(--yellow);
}

.top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
}

.query {
  display: flex;
  flex: 0 1 500px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 50px;
  padding: 0 22px 0 16px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.query:hover {
  background: #fff;
  box-shadow: 0 3px 0 var(--ink);
}

.query svg {
  flex: none;
}

.query b {
  flex: none;
  font-size: 1.12rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.query span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tabs {
  display: flex;
  gap: 2px;
  margin-top: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs a {
  padding: 10px 17px 11px;
  border-radius: 10px 10px 0 0;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.tabs a:hover {
  background: rgb(255 255 255 / 0.5);
}

.tabs a[aria-current] {
  background: #fff;
}

.tabs a:focus-visible {
  outline-offset: -3px;
}

/* ---------- The page: results on the left, a panel on the right ---------- */

.serp {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "lead side"
    "results side";
  column-gap: 64px;
  align-items: start;
  padding: 36px 0 52px;
}

.serp--lone {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "lead"
    "results";
}

.lead {
  grid-area: lead;
}

.panel,
.side {
  grid-area: side;
}

.results {
  grid-area: results;
  margin-top: 28px;
}

.lead h1 {
  font-size: clamp(2.1rem, 4.4vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.lede {
  max-width: 56ch;
  margin-top: 14px;
  font-size: 1.2rem;
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

/* The address line above a result */

.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.3;
}

.crumb::before {
  content: "R";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 800;
}

.crumb span + span::before {
  content: "\203A";
  margin: 0 6px;
}

.crumb--plain::before {
  display: none;
}

.crumb--plain span:first-child {
  color: var(--ink);
  font-weight: 700;
}

.crumb--plain span + span::before {
  content: "";
  margin: 0 5px;
}

.lead .crumb {
  margin-bottom: 12px;
}

/* One result */

.result {
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.result:last-child {
  padding-bottom: 0;
}

.result h2 a,
.result h3 a {
  text-decoration-color: var(--yellow-deep);
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}

.result h3 a {
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.result p {
  max-width: 64ch;
}

.result h2 + p,
.result h2 + .prose,
.result .meta + .prose {
  margin-top: 8px;
}

.prose p + p,
.result--thumb p + p {
  margin-top: 0.85em;
}

.sitelinks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 36px;
  margin-top: 18px;
  padding-left: 18px;
  border-left: 3px solid var(--yellow);
}

.sitelinks--one {
  grid-template-columns: 1fr;
}

.sitelinks p {
  margin-top: 3px;
  font-size: 0.98rem;
}

.result--thumb {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 24px;
  align-items: start;
}

.result--thumb img {
  width: 128px;
  height: 128px;
  border-radius: 14px;
  object-fit: cover;
}

.result--thumb h2 + p {
  margin-top: 8px;
}

.stories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.stories li {
  padding: 14px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.stories .meta {
  margin-bottom: 6px;
}

.stories p:last-child {
  font-size: 0.98rem;
  line-height: 1.45;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chips li {
  padding: 5px 13px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--wash);
  color: var(--ink);
  font-size: 0.96rem;
}

.rows {
  margin-top: 16px;
}

.rows div {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.rows dt {
  color: var(--ink);
  font-weight: 650;
}

.timeline {
  margin-top: 14px;
}

.timeline li {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.timeline time {
  align-self: start;
  justify-self: start;
  padding: 0 7px;
  border-radius: 5px;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.faq {
  margin-top: 14px;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: 12px;
}

.faq details + details {
  margin-top: 8px;
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  border-radius: 12px;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  color: var(--ink);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq summary:hover {
  background: var(--wash);
}

.faq details p {
  padding: 0 16px 16px;
}

/* ---------- The facts panel and side cards ---------- */

.panel,
.card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.mosaic {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
  aspect-ratio: 3 / 2;
}

.mosaic picture {
  min-height: 0;
}

.mosaic picture:first-child {
  grid-row: span 2;
}

.mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.panel-body {
  padding: 18px 22px 22px;
}

.panel-name {
  color: var(--ink);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.panel-role {
  color: var(--muted);
}

.panel-role + p {
  margin-top: 12px;
}

.panel h2,
.card h2 {
  font-size: 1.1rem;
}

.panel h2 {
  margin-top: 20px;
}

.proof li {
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.proof li:first-child {
  border-top: 0;
}

.proof li:last-child {
  padding-bottom: 0;
}

.proof strong {
  display: block;
  color: var(--ink);
  font-weight: 700;
}

.proof span {
  font-size: 0.98rem;
}

.panel-links {
  margin-top: 16px;
}

.card {
  padding: 20px 22px 22px;
}

.card h3 {
  margin-top: 16px;
}

.card h3 + p {
  margin-top: 3px;
}

.card h2 + .proof {
  margin-top: 4px;
}

.ledger {
  margin-top: 6px;
}

.ledger div {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.ledger div:first-child {
  border-top: 0;
}

.ledger div:last-child {
  padding-bottom: 0;
}

.ledger dt {
  color: var(--ink);
  font-weight: 700;
}

.ledger dd {
  font-size: 0.98rem;
}

.card--photo {
  padding: 0;
}

.card--photo img {
  width: 100%;
}

.card--photo > div {
  padding: 18px 22px 22px;
}

.card--photo h2 + ul,
.card--photo h2 + p {
  margin-top: 8px;
}

.card--photo ul + h2,
.card--photo p + h2 {
  margin-top: 18px;
}

.ticks li {
  position: relative;
  padding-left: 22px;
}

.ticks li + li {
  margin-top: 5px;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 10px;
  height: 10px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
}

/* ---------- Contact form ---------- */

.form {
  display: grid;
  gap: 16px;
  max-width: 620px;
}

.form label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-weight: 650;
}

.form small {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
}

.form label:has(small) {
  grid-template-columns: auto 1fr;
  align-items: baseline;
}

.form label:has(small) input {
  grid-column: 1 / -1;
}

.form input,
.form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--field);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

.form textarea {
  resize: vertical;
}

.form .btn {
  justify-self: start;
}

.notice {
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--wash);
  color: var(--ink);
}

.form-status:empty {
  display: none;
}

.form-status[data-state="error"] {
  color: var(--error);
  font-weight: 650;
}

/* ---------- Call to action and footer ---------- */

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
  margin-bottom: 56px;
  padding: 26px 32px 28px;
  border-radius: 18px;
  background: var(--yellow);
  color: var(--ink);
}

.cta h2 {
  font-size: 1.55rem;
}

.cta p {
  max-width: 58ch;
  margin-top: 5px;
}

.foot {
  border-top: 1px solid var(--line);
  background: var(--wash);
  font-size: 0.98rem;
}

.foot-cols {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1.7fr;
  gap: 40px;
  padding: 36px 0;
}

.foot h2 {
  margin-bottom: 8px;
  font-size: 1rem;
  letter-spacing: 0;
}

.foot li + li {
  margin-top: 3px;
}

.foot li a {
  text-decoration: none;
}

.foot li a:hover {
  text-decoration: underline;
}

.foot-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  padding: 16px 0 20px;
  border-top: 1px solid var(--line);
}

/* ---------- Smaller screens ---------- */

@media (max-width: 900px) {
  .serp {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas:
      "lead"
      "results"
      "side";
    padding: 28px 0 40px;
  }

  .serp:has(.panel) {
    grid-template-areas:
      "lead"
      "side"
      "results";
  }

  .panel,
  .side {
    margin-top: 28px;
  }

  .foot-cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }
}

@media (max-width: 640px) {
  .sitelinks,
  .stories {
    grid-template-columns: minmax(0, 1fr);
  }

  .query span {
    display: none;
  }

  .result--thumb {
    grid-template-columns: minmax(0, 1fr) 88px;
    gap: 16px;
  }

  .result--thumb img {
    width: 88px;
    height: 88px;
  }

  .rows div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .cta {
    padding: 22px 22px 24px;
  }
}

/* Phones: run the tabs edge to edge and tighten them so all six fit without scrolling. */
@media (max-width: 480px) {
  .tabs {
    width: 100%;
    gap: 0;
    padding: 0 6px;
  }

  .tabs a {
    padding: 9px 5px 10px;
    font-size: 0.9rem;
  }

  /* The Contact tab and the button under the heading already cover this. */
  .top .btn {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
}
