/*
    links.it.metrc.com - Deep Forest dots side panel, as chosen on the design canvas.
    Colours are Metrc brand values. Secondary text is #5A6E6A rather than the brand's
    #6B7F7B tone, because the brand tone is 4.25:1 on white and this is 5.4:1.
*/
:root {
  --forest: #213f39;
  --sage: #C8DCCA;
  --sage-2: #DAE8DC;
  --sage-3: #EDF3ED;
  --highlighter: #E9F800;
  --kelly: #149F69;
  --line: #DADFDE;
  --ink: #111111;
  --ink-muted: #5A6E6A;
  --surface: #FFFFFF;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--surface);
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

a { color: var(--forest); }
a:hover { color: var(--kelly); }

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

[hidden] { display: none !important; }

.layout {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------- panel */

.panel {
  flex: 1 1 320px;
  max-width: 420px;
  padding: 32px 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 56px;
  background: var(--forest) url("/brand/bg-forest-dots.jpg") no-repeat;
  background-size: 1000px auto;
  background-position: left -430px bottom -60px;
}

.wordmark { height: 30px; width: auto; display: block; align-self: flex-start; }

.panel h1 {
  margin: 0;
  font-size: 52px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--sage);
}

.panel .intro { margin: 18px 0 0; font-size: 16px; line-height: 1.55; color: #FFFFFF; }
.panel .support { margin: 12px 0 0; font-size: 13px; line-height: 1.55; color: var(--sage-2); }
.panel a { color: var(--sage); font-weight: 600; }
.panel a:hover { color: var(--highlighter); }

/* -------------------------------------------------------------- content */

.content {
  flex: 999 1 560px;
  min-width: 0;
  max-width: 860px;
  padding: 24px 56px 48px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.account {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 14px;
  font-size: 13px;
  color: var(--ink-muted);
  min-height: 44px;
}

.role-pills { display: inline-flex; flex-wrap: wrap; gap: 6px; }

.role-pill {
  border: 1.5px solid var(--forest);
  color: var(--forest);
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 600;
  font-size: 12px;
}

.link-button {
  font: inherit;
  font-weight: 500;
  color: var(--forest);
  background: none;
  border: 0;
  padding: 10px 4px;
  min-height: 44px;
  text-decoration: underline;
  cursor: pointer;
}
.link-button:hover { color: var(--kelly); }

.status { margin: 0; color: var(--ink-muted); font-size: 14px; }

.error {
  border: 1.5px solid var(--forest);
  border-radius: 16px;
  padding: 14px 18px;
  font-size: 14px;
}

.sections { display: flex; flex-direction: column; gap: 40px; }
.sections:empty { display: none; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 0 0 10px;
  border-bottom: 2px solid var(--forest);
}
.section-head h2 { margin: 0; font-size: 20px; font-weight: 700; color: var(--forest); }
.section-count { font-size: 13px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }

.link-list { list-style: none; margin: 0; padding: 0; }

.link-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 40px;
  gap: 16px;
  align-items: start;
  padding: 18px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.link-row:hover { background: var(--sage-3); color: var(--ink); }
.link-row:hover .go { background: var(--highlighter); border-color: var(--highlighter); }

.link-icon { width: 36px; height: 36px; display: block; }

.link-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.link-title-line { display: flex; align-items: baseline; gap: 10px; }
.link-title { font-size: 17px; font-weight: 600; color: var(--forest); white-space: nowrap; }
.leader { flex: 1; border-bottom: 1.5px dotted var(--sage); transform: translateY(-4px); }
.host-inline { font-size: 13px; color: var(--ink-muted); white-space: nowrap; }
.host-below { display: none; font-size: 13px; color: var(--ink-muted); overflow-wrap: anywhere; }
.link-description { font-size: 14px; line-height: 1.5; }

.audiences {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-muted);
}
.audience {
  border: 1px solid var(--forest);
  color: var(--forest);
  border-radius: 999px;
  padding: 0 8px;
  font-weight: 600;
}

.go {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}
.go svg { width: 14px; height: 14px; }

.footer-note { margin: 0; font-size: 12px; color: var(--ink-muted); }

/* ------------------------------------------------------------- 403 page */

.denied { display: flex; flex-direction: column; gap: 24px; max-width: 620px; }
.denied h2 { margin: 0; font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; color: var(--forest); }
.denied-lead { margin: 0; font-size: 17px; line-height: 1.55; }
.received { border-top: 2px solid var(--forest); padding-top: 14px; }
.received h3 { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: var(--forest); }
.received dl { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 14px; }
.received dt { color: var(--ink-muted); }
.received dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.muted-inline { color: var(--ink-muted); }
.muted { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-muted); }

.buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  border-radius: 999px;
  padding: 11px 22px;
  min-height: 44px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.button-primary { background: var(--highlighter); color: var(--forest); border: 1.5px solid var(--highlighter); }
.button-secondary { background: none; color: var(--forest); border: 1.5px solid var(--forest); }
.button:hover { background: var(--forest); color: var(--highlighter); border-color: var(--forest); }

/* ---------------------------------------------------------- phone width */

@media (max-width: 700px) {
  .panel { max-width: none; background-image: none; gap: 32px; padding: 24px; }
  .panel h1 { font-size: 40px; }
  .content { padding: 16px 16px 40px; }
  .account { justify-content: flex-start; }
  .link-row { padding: 16px 8px; gap: 12px; }
  .leader, .host-inline { display: none; }
  .host-below { display: block; }
  .link-title { white-space: normal; }
  .received dl { grid-template-columns: 1fr; gap: 2px; }
  .received dd { margin-bottom: 8px; }
}

@media (prefers-reduced-motion: no-preference) {
  .link-row, .go, .button { transition: background-color 0.12s ease-out, border-color 0.12s ease-out, color 0.12s ease-out; }
}
