/* Tech & Talk — Tea & Biscuits v1 */

:root {
  --tea-navy: #102037;
  --tea-gold: #c98a26;
  --tea-cream: #fffaf0;
  --tea-green: #315348;
  --tea-brown: #71471f;
}

/* Launcher */
.tea-tin-launcher {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 80;

  width: 210px;
  height: auto;
  padding: 0;
  border: 0;

  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;

  transition: transform 260ms ease;
}

.tea-tin-launcher img {
  display: block;
  width: 100%;
  height: auto;
}

.tea-tin-launcher.is-tucked {
  transform: translateX(calc(-100% + 28px));
}

.tea-tin-launcher:hover:not(.is-tucked) {
  transform: translateY(-3px);
}

.tea-tin-launcher:focus-visible {
  outline: 3px solid var(--tea-green);
  outline-offset: 5px;
  border-radius: 24px;
}

.tea-tin-tuck {
  position: absolute;
  top: 50%;
  right: 6px;

  display: grid;
  place-items: center;

  width: 26px;
  height: 34px;

  color: var(--tea-navy);
  background: rgb(255 250 240 / 88%);
  border-radius: 999px;

  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;

  transform: translateY(-50%);
  box-shadow: 0 2px 8px rgb(0 0 0 / 18%);
}

.tea-tin-launcher.is-tucked .tea-tin-tuck {
  transform: translateY(-50%) rotate(180deg);
}

/* Dialog and tin */
.tea-dialog {
  width: min(860px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);

  padding: 0;
  border: 0;

  background: transparent;
  overflow: hidden;
}

.tea-dialog:focus-visible {
  outline: none;
}

.tea-dialog::backdrop {
  background: rgb(17 23 20 / 66%);
  backdrop-filter: blur(2px);
}

.biscuit-tin {
  position: relative;
  width: 100%;
  max-height: calc(100vh - 32px);

  background: linear-gradient(145deg, #f8f1db 0%, #efe2bc 55%, #e1cf9e 100%);
  border: 3px solid #8e6f38;
  border-radius: 30px;

  box-shadow:
    0 24px 60px rgb(0 0 0 / 38%),
    inset 0 0 0 5px rgb(255 255 255 / 35%),
    inset 0 -10px 20px rgb(102 74 29 / 12%);

  overflow: hidden;
}

.biscuit-tin__lid {
  position: relative;

  max-height: calc(100vh - 38px);
  padding: 2rem 2.5rem 2.5rem;

  background:
    radial-gradient(ellipse at top, rgb(255 255 255 / 65%) 0%, transparent 45%),
    linear-gradient(to bottom, #fbf7ea 0%, #f6ebcf 55%, #eedeb2 100%);

  box-shadow:
    inset 0 10px 16px rgb(255 255 255 / 55%),
    inset 0 -12px 20px rgb(143 111 54 / 12%);

  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #9f7b43 transparent;
  scrollbar-width: thin;
}

.biscuit-tin__lid::-webkit-scrollbar {
  width: 10px;
}

.biscuit-tin__lid::-webkit-scrollbar-thumb {
  background: #9f7b43;
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

.biscuit-tin__heading {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 24px;
  align-items: start;

  margin-bottom: 26px;
}

.biscuit-tin__plaque {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;

  width: 150px;
  min-width: 0;
  padding: 0.7rem 1rem;

  color: #f7edcf;
  background: linear-gradient(145deg, #355447 0%, #243f35 100%);
  border: 2px solid #b58b48;
  border-radius: 12px;

  box-shadow:
    inset 0 0 0 2px rgb(255 255 255 / 8%),
    0 4px 10px rgb(57 39 16 / 20%);

  text-align: center;
  line-height: 1.05;
}

.biscuit-tin__plaque span {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.biscuit-tin__plaque strong {
  margin-top: 0.25rem;
  font-size: 1.05rem;
}

.biscuit-tin__intro {
  min-width: 0;
}

.biscuit-tin__heading h2 {
  margin: 0;

  color: #3f3020;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.035em;
}

.biscuit-tin__welcome {
  margin: 16px 0 5px;
  color: #34200d;
  font-size: 1rem;
  line-height: 1.45;
}

.biscuit-tin__topic {
  margin: 0;
  color: #5d4020;
  font-size: 0.95rem;
  line-height: 1.45;
}

.tea-close {
  position: sticky;
  top: 0;
  z-index: 5;
  float: right;

  display: grid;
  place-items: center;

  width: 2.5rem;
  height: 2.5rem;
  margin: -0.75rem -1rem 0 0;
  padding: 0;

  color: #4d3922;
  background: #fffaf0;
  border: 2px solid #9f7b43;
  border-radius: 50%;

  font: inherit;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;

  box-shadow: 0 3px 8px rgb(67 43 16 / 20%);
}

.tea-close:hover {
  background: #f3dfad;
}

.tea-close:focus-visible {
  outline: 3px solid var(--tea-green);
  outline-offset: 3px;
}

/* Biscuit selection guide */
.biscuit-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem 1rem;

  margin-bottom: 2rem;
  clear: both;
}

.biscuit-menu > * {
  min-width: 0;
}

.biscuit {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;

  width: 100%;
  min-height: 62px;
  padding: 0.55rem 0.7rem;

  color: #4a321d;
  background: linear-gradient(145deg, #f4dca8 0%, #e8c47f 100%);
  border: 1px solid #b1813d;
  border-radius: 14px;

  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 45%),
    0 2px 4px rgb(69 44 16 / 12%);

  text-align: left;
  cursor: default;

  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border-color 140ms ease;
}

.biscuit:hover,
.biscuit:focus-within,
.biscuit.is-selected {
  border-color: var(--tea-green);
  transform: translateY(-1px);

  box-shadow:
    inset 0 0 0 2px rgb(49 83 72 / 16%),
    0 6px 10px rgb(69 44 16 / 18%);
}

.biscuit:focus-visible {
  outline: 3px solid var(--tea-green);
  outline-offset: 3px;
}

.biscuit.is-active {
  border-color: var(--tea-green);

  box-shadow:
    inset 0 0 0 2px rgb(49 83 72 / 20%),
    0 3px 8px rgb(69 44 16 / 16%);
}

.biscuit--advertising {
  background:
    repeating-linear-gradient(-45deg, rgb(255 255 255 / 12%) 0 8px, transparent 8px 16px),
    linear-gradient(145deg, #ead6a8 0%, #dab876 100%);
}

.biscuit__icon {
  display: grid;
  place-items: center;

  width: 2.6rem;
  height: 2.6rem;
  flex: 0 0 auto;

  color: #f8edcf;
  background: var(--tea-green);
  border: 2px solid #9c763e;
  border-radius: 50%;

  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
}

.biscuit__icon svg {
  width: 1.45rem;
  height: 1.45rem;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.biscuit__icon svg circle {
  fill: currentColor;
  stroke: none;
}

.biscuit__copy {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.biscuit__name {
  font-size: 1rem;
  line-height: 1.15;
}

.biscuit__description {
  color: #64492c;
  font-size: 0.88rem;
  line-height: 1.3;
}

.biscuit__status {
  color: #6c4b25;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.25;
}

.biscuit__toggle {
  display: grid;
  place-items: center;

  width: 2rem;
  height: 2rem;
  padding: 0;

  color: #fff;
  background: transparent;
  border: 2px solid rgb(78 54 27 / 35%);
  border-radius: 50%;

  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
}

.biscuit__toggle:hover {
  border-color: var(--tea-green);
  background: rgb(49 83 72 / 10%);
}

.biscuit__toggle.is-checked {
  background: var(--tea-green);
  border-color: var(--tea-green);
}

.biscuit__toggle:focus-visible {
  outline: 3px solid var(--tea-green);
  outline-offset: 3px;
}

.biscuit--informational {
  grid-template-columns: auto minmax(0, 1fr);
}

.biscuit-menu__bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;

  margin: -0.75rem 0 1.75rem;
}

.biscuit-bulk-action {
  padding: 0.7rem 1rem;

  color: #f9f1da;
  background: var(--tea-green);
  border: 2px solid #9d7840;
  border-radius: 999px;

  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.biscuit-bulk-action:hover {
  background: #243f36;
}

.biscuit-bulk-action:focus-visible {
  outline: 3px solid var(--tea-green);
  outline-offset: 3px;
}

/* Workshop explanation */
.biscuit-guidance {
  padding-bottom: 0.25rem;
}

.biscuit-menu__explanation {
  margin: 0 0 10px;
  color: #34200d;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.45;
}

.biscuit-message {
  margin-top: 0;
}

.biscuit-message h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.biscuit-message p {
  margin: 0;
  max-width: 68ch;
  line-height: 1.55;
}


.biscuit-message__layers {
  display: grid;
  gap: 0.9rem;
}

.biscuit-message__layers section {
  margin: 0;
}

.biscuit-message__layers h4 {
  margin: 0 0 0.2rem;

  color: #315348;
  font-size: 0.82rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.biscuit-message__layers p {
  margin: 0;
}

.biscuit-message__provider-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;

  color: #244f43;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.biscuit-message__provider-link a:hover {
  text-decoration-thickness: 2px;
}

.tea-live-message {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* First-visit banner */
.tea-consent-banner {
  position: fixed;
  z-index: 9998;
  right: 18px;
  bottom: 18px;

  width: min(620px, calc(100vw - 36px));
  padding: 18px;

  color: #34200d;
  background: #fff8e8;
  border: 2px solid #b58231;
  border-radius: 18px;

  box-shadow: 0 14px 38px rgb(17 23 20 / 28%);
}

.tea-consent-banner[hidden] {
  display: none;
}

.tea-consent-banner__close {
  position: absolute;
  top: 8px;
  right: 10px;

  width: 34px;
  height: 34px;
  padding: 0;

  color: #34200d;
  background: transparent;
  border: 0;

  font-size: 1.35rem;
  cursor: pointer;
}

.tea-consent-banner__copy {
  padding-right: 34px;
}

.tea-consent-banner__copy strong {
  display: block;
  margin-bottom: 5px;

  color: #183f35;
  font-family: Georgia, serif;
  font-size: 1.2rem;
}

.tea-consent-banner__copy p {
  margin: 0;
  line-height: 1.5;
}

.tea-consent-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;

  margin-top: 14px;
}

.tea-consent-banner__actions button {
  padding: 10px 15px;

  color: #fff;
  background: #234f43;
  border: 1px solid #b58231;
  border-radius: 999px;

  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.tea-consent-banner__actions button:hover {
  background: #183f35;
}

.tea-consent-banner__actions button:last-child {
  color: #234f43;
  background: #f2dfad;
}

.tea-consent-banner__actions button:last-child:hover {
  background: #ead08b;
}

/* Mobile-only navigation access */
.nav a.tea-mobile-menu-link {
  display: none !important;
}

@media (min-width: 701px) and (max-width: 1100px) {
  .tea-tin-launcher {
    width: 160px;
    left: 12px;
    bottom: 12px;
  }
}

@media (max-width: 700px) {
  .tea-tin-launcher {
    display: none;
  }

  .nav a.tea-mobile-menu-link {
    display: block !important;
  }

  .tea-dialog {
    width: min(100vw - 16px, 860px);
    max-height: calc(100vh - 16px);
  }

  .biscuit-tin {
    max-height: calc(100vh - 16px);
  }

  .biscuit-tin__lid {
    max-height: calc(100vh - 22px);
    padding: 1.25rem 1rem 1.5rem;
  }

  .biscuit-tin__heading {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .biscuit-tin__plaque {
    width: 150px;
  }

  .biscuit-tin__heading h2 {
    padding-right: 2.5rem;
    font-size: 2.5rem;
  }

  .biscuit-tin__welcome {
    margin-top: 10px;
  }

  .biscuit-menu {
    grid-template-columns: 1fr;
  }

  .tea-close {
    margin-right: 0;
  }
}

@media (max-width: 600px) {
  .tea-consent-banner {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
  }

  .tea-consent-banner__actions {
    display: grid;
  }

  .tea-consent-banner__actions button {
    width: 100%;
  }
}


/* --------------------------------------------------
   Page Apple — optional on-page tips
-------------------------------------------------- */

.tea-page-apple {
  position: fixed;
  right: 18px;
  bottom: 96px;
  z-index: 75;
}

.tea-page-apple[hidden],
.tea-page-apple__tip[hidden] {
  display: none;
}

.tea-page-apple__button {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;

  padding: 0.45rem 0.75rem 0.45rem 0.45rem;

  color: #f8edcf;
  background: #315348;
  border: 2px solid #b58b48;
  border-radius: 999px;

  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 5px 16px rgb(28 42 36 / 24%);
}

.tea-page-apple__button:hover {
  transform: translateY(-1px);
  background: #243f36;
}

.tea-page-apple__button:focus-visible,
.tea-page-apple__next:focus-visible,
.tea-page-apple__close:focus-visible {
  outline: 3px solid #c98a26;
  outline-offset: 3px;
}

.tea-page-apple__icon {
  display: grid;
  place-items: center;

  width: 2rem;
  height: 2rem;

  color: #315348;
  background: #f4dca8;
  border-radius: 50%;
}

.tea-page-apple__icon svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tea-page-apple__tip {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);

  width: min(360px, calc(100vw - 36px));
  padding: 1.1rem 1.2rem;

  color: #34200d;
  background: #fff8e8;
  border: 2px solid #b58231;
  border-radius: 18px;
  box-shadow: 0 14px 38px rgb(17 23 20 / 28%);
}

.tea-page-apple__eyebrow {
  margin: 0 2rem 0.3rem 0;
  color: #315348;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tea-page-apple__title {
  margin: 0 2rem 0.45rem 0;
  color: #3f3020;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.22rem;
}

.tea-page-apple__text {
  margin: 0;
  line-height: 1.55;
}

.tea-page-apple__next {
  margin-top: 0.9rem;
  padding: 0.6rem 0.85rem;

  color: #fff;
  background: #315348;
  border: 1px solid #9d7840;
  border-radius: 999px;

  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.tea-page-apple__close {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;

  width: 2rem;
  height: 2rem;
  padding: 0;

  color: #4d3922;
  background: transparent;
  border: 0;
  border-radius: 50%;

  font: inherit;
  font-size: 1.3rem;
  cursor: pointer;
}

@media (max-width: 700px) {
  .tea-page-apple {
    right: 10px;
    bottom: 76px;
  }

  .tea-page-apple__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  .tea-page-apple__button {
    padding: 0.4rem;
  }
}
