/* The earnings calendar, in the language of the rest of the site: cards on paper, Schibsted Grotesk headings, Hanken Grotesk text and
   DM Mono for labels and figures. Fonts, colours, radii and shadows come from site.css; classes are prefixed ec- so nothing leaks out. */
.ec {
  --grid: #d9ccb4; --wash: #f3ecde; --hover: #f7f1e5; --today: #e2ebe5; --today-head: #cddcd4;
  padding-bottom: 8px;
}
.ec-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:where(.ec) h1, :where(.ec) h2, :where(.ec) h3 { margin: 0; font-family: var(--display); color: var(--ink); }
:where(.ec) h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; }
:where(.ec) h2 { font-size: 1.65rem; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }

/* Tabs and size filters are the sort control of the company directory. */
.ec-pills { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: 1rem; font-size: .85rem; color: var(--stone); }
.ec-tabs { margin-top: 1.25rem; font-weight: 600; }
.ec-pill { padding: .3rem .7rem; border-radius: var(--r-pill); }
.ec-pill:hover { background: var(--card); color: var(--ink); }
.ec-pill.ec-on { background: var(--pine); color: #fff; }

/* Headings */
.ec-wk-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1.25rem; padding: 1rem 0 1.1rem; }
.ec-wk-head p { margin: 0; color: var(--stone); font-family: var(--mono); font-size: .8rem; }
.ec-wk-head a:hover { color: var(--pine); }
.ec-wk-head-sub { padding: 0 0 1rem; }
.ec-intro { padding: 1rem 0 .25rem; }
.ec-lead { margin: .5rem 0 0; color: var(--stone); font-size: 1.02rem; }

/* The calendar: days across, the time of the report down, and the logos as the content. */
.ec-week { display: grid; grid-template-columns: 84px repeat(5, minmax(0, 1fr)); overflow: hidden; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.ec-week::before { content: ""; grid-column: 1; grid-row: 1; background: var(--wash); } /* the corner above the row labels */
.ec-week::after { content: ""; grid-column: 1; grid-row: 5; background: var(--wash); } /* the label column runs to the bottom */
.ec-week-done { grid-template-columns: 0 repeat(5, minmax(0, 1fr)); }
.ec-week-done::before, .ec-week-done::after { display: none; }
.ec-week-done .ec-wd-1 > * { border-left: 0; }
.ec-wd { display: contents; }
.ec-wd > * { min-width: 0; padding: .8rem; border-left: 1px solid var(--grid); background: var(--card); }
.ec-wd-1 > * { grid-column: 2; } .ec-wd-2 > * { grid-column: 3; } .ec-wd-3 > * { grid-column: 4; } .ec-wd-4 > * { grid-column: 5; } .ec-wd-5 > * { grid-column: 6; }
.ec-wd > .ec-wd-top { grid-row: 1; padding-top: .55rem; padding-bottom: .55rem; background: var(--wash); }
.ec-slot-am, .ec-rl-am { grid-row: 2; } .ec-slot-pm, .ec-rl-pm { grid-row: 3; } .ec-slot-na, .ec-rl-na { grid-row: 4; }
.ec-slot-all { grid-row: 2 / span 3; }
.ec-wd > .ec-wd-more { grid-row: 5; padding-top: 0; padding-bottom: .7rem; }
.ec-wd-today > * { background: var(--today); }
.ec-wd-today > .ec-wd-top { background: var(--today-head); }
.ec-slot, .ec-rl { border-top: 1px solid var(--grid); }
.ec-rl { grid-column: 1; display: flex; flex-direction: column; gap: .35rem; padding: .8rem .5rem .8rem .8rem; background: var(--wash); color: var(--stone); font-family: var(--mono); font-size: .66rem; letter-spacing: .04em; line-height: 1.3; text-transform: uppercase; }
.ec-rl .ec-ico { width: 18px; height: 18px; }
.ec-wd-head { display: flex; align-items: center; gap: .5rem; color: var(--ink); }
a.ec-wd-head:hover .ec-wd-num { color: var(--pine); }
.ec-wd-num { font-family: var(--display); font-size: 1.7rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.ec-wd-lab { display: flex; flex-direction: column; color: var(--stone); font-family: var(--mono); font-size: .7rem; line-height: 1.25; text-transform: uppercase; }
.ec-wd-lab b { color: var(--ink); font-weight: 500; }
.ec-wd-tag { min-height: 1.3em; margin: .2rem 0 0; color: var(--stone); font-family: var(--mono); font-size: .7rem; line-height: 1.3; }
.ec-week:not(:has(.ec-wd-tag:not(:empty))) .ec-wd-tag { display: none; } /* no today or tomorrow in this week, so no gap for the label */
.ec-wd-today .ec-wd-num, .ec-wd-today .ec-wd-tag, .ec-wd-today .ec-wd-lab b { color: var(--pine); }
.ec-wd-past .ec-wd-num, .ec-wd-past .ec-wd-lab, .ec-wd-past .ec-wd-lab b { color: var(--faint); }
.ec-slot-lab { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } /* the row label says it on a wide screen */

.ec-cos { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .9rem; }
.ec-week-m .ec-cos { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .75rem; }
.ec-co { display: flex; flex-direction: column; gap: .2rem; min-width: 0; color: var(--ink); }
.ec-co b { font-size: .8rem; font-weight: 600; line-height: 1.2; overflow-wrap: break-word; hyphens: auto; }
.ec-co:hover b { color: var(--pine); text-decoration: underline; }
.ec-co-res { color: var(--stone); font-family: var(--mono); font-size: .7rem; line-height: 1.2; }
.ec-up { color: var(--pine); font-weight: 500; }
.ec-down { color: var(--brick); font-weight: 500; }

/* The stage keeps names on one line across a row whatever the shape of the logo. */
.ec-logo { display: flex; align-items: center; flex: none; min-width: 0; }
.ec-logo-l { height: 42px; }
.ec-logo-m { height: 34px; }
.ec-logo-s { height: 40px; }
.ec-logo-c { height: 72px; }
.ec-logo-h { height: 120px; }
.ec-wm { display: block; max-width: 100%; height: auto; mix-blend-mode: multiply; } /* a file with a white box must not show on a tinted cell */
.ec-logo-l .ec-lg { --s: 40px; }
.ec-logo-m .ec-lg { --s: 32px; }
.ec-logo-s .ec-lg { --s: 36px; }
.ec-logo-c .ec-lg { --s: 64px; }
.ec-logo-h .ec-lg { --s: 96px; }

/* Icon tiles match the company logos elsewhere on the site. A broken image shows the initials through ::after, without any script. */
.ec-lg { --s: 48px; position: relative; display: block; flex: none; width: var(--s); height: var(--s); overflow: hidden; background: #fff; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--rule); }
.ec-lg img { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; }
.ec-lg img::after { content: attr(data-i); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--wash); color: var(--stone); font-size: calc(var(--s) * .34); font-weight: 700; }
.ec-lg-pad img { padding: 8%; }
.ec-lg-none { display: flex; align-items: center; justify-content: center; background: var(--wash); box-shadow: none; color: var(--stone); font-size: calc(var(--s) * .34); font-weight: 700; }
.ec-ico { display: block; width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.ec-more { display: inline-block; color: var(--pine); font-family: var(--mono); font-size: .74rem; }
.ec-more:hover { text-decoration: underline; }
.ec-none { margin: 0; color: var(--faint); font-size: .88rem; }
.ec-empty { margin: 0; padding: 1.5rem 0; color: var(--stone); }

/* Later weeks are rows of a card, like the company directory. */
.ec-sec { padding-top: 2rem; }
.ec-sec > h2 { margin-bottom: 1rem; }
.ec-later { overflow: hidden; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.ec-later-row { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; align-items: center; gap: 1.5rem; padding: .8rem 1.25rem; border-top: 1px solid var(--rule-soft); color: var(--ink); }
.ec-later-row:first-child { border-top: 0; }
.ec-later-row:hover { background: var(--hover); }
.ec-later-row:hover .ec-later-date { color: var(--pine); }
.ec-later-date { font-weight: 700; }
.ec-later-logos { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 2rem; }
.ec-later-n { color: var(--stone); font-family: var(--mono); font-size: .74rem; }

/* Companies on a day are cards. */
.ec-group { padding-top: 2rem; }
.ec-group h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .75rem; margin-bottom: 1rem; }
.ec-group h2 a:hover { color: var(--pine); }
.ec-group h2 .ec-ico { align-self: center; width: 22px; height: 22px; color: var(--stone); }
.ec-group .ec-more { margin-top: 1rem; }
.ec-cnt { color: var(--stone); font-family: var(--sans); font-size: .88rem; font-weight: 400; letter-spacing: 0; }
.ec-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.ec-card { display: flex; flex-direction: column; min-width: 0; padding: 1rem 1.1rem; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); color: var(--ink); line-height: 1.3; transition: box-shadow .15s; }
.ec-card:hover { box-shadow: var(--shadow-lg); }
.ec-card .ec-logo { margin-bottom: .6rem; }
.ec-card b { font-weight: 700; }
.ec-card:hover b { color: var(--pine); }
.ec-card-f { margin-top: .2rem; color: var(--stone); font-family: var(--mono); font-size: .72rem; }
.ec-card-f.ec-up { color: var(--pine); }
.ec-card-f.ec-down { color: var(--brick); }

/* One company */
.ec-company { padding-top: 1rem; }
.ec-co-head { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }
.ec-co-head h1 { overflow-wrap: anywhere; }
.ec-co-head p { margin: .3rem 0 0; color: var(--stone); font-family: var(--mono); font-size: .85rem; }
.ec-next { margin-top: 1.5rem; padding: 1.25rem 1.4rem; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.ec-next p { margin: 0; }
.ec-next-when { font-family: var(--display); font-size: clamp(2rem, 4.5vw, 2.8rem); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; }
.ec-next .ec-next-date { margin-top: .4rem; font-size: 1.1rem; font-weight: 600; }
.ec-next .ec-next-session { display: flex; align-items: center; gap: .45rem; margin-top: .2rem; color: var(--stone); }
.ec-btn { margin-top: 1rem; }
.ec-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; margin: 1rem 0 0; }
.ec-facts > div { display: flex; flex-direction: column; gap: .25rem; padding: .95rem; background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow); min-width: 0; }
.ec-facts dt { color: var(--stone); font-size: .8rem; }
.ec-facts dd { margin: 0; font-family: var(--mono); font-size: 1.15rem; letter-spacing: -.02em; overflow-wrap: anywhere; }
.ec-rows { display: flex; flex-direction: column; gap: .15rem; }
.ec-rows-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .5rem 1.75rem; }
.ec-row { display: flex; align-items: center; gap: .7rem; min-width: 0; padding: .45rem 0; color: var(--ink); }
.ec-row .ec-logo { width: 110px; }
.ec-row:hover b { color: var(--pine); }
.ec-row-t { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.ec-row-t b { font-weight: 700; font-size: .95rem; }
.ec-row-t span { color: var(--stone); font-family: var(--mono); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec-mark { flex: none; color: var(--faint); font-family: var(--mono); font-size: .72rem; }
.ec-mark.ec-up { color: var(--pine); }
.ec-mark.ec-down { color: var(--brick); }
.ec-note { margin: 1.5rem 0 0; color: var(--stone); font-size: .88rem; }

/* Tables follow the directory: tinted mono head, thin rows, mono figures. */
.ec-table-wrap { overflow-x: auto; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); }
:where(.ec) table { width: 100%; border-collapse: collapse; font-size: .92rem; }
:where(.ec) th, :where(.ec) td { padding: .7rem 1.25rem; text-align: left; border-top: 1px solid var(--rule-soft); white-space: nowrap; font-weight: 400; }
:where(.ec) thead th { padding-block: .55rem; border-top: 0; background: var(--wash); color: var(--stone); font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; }
:where(.ec) tbody th a { color: var(--pine); font-weight: 600; }
.ec-num { font-family: var(--mono); text-align: right; }
:where(.ec) th.ec-num, :where(.ec) td.ec-num { text-align: right; }

.ec-pager { display: flex; justify-content: space-between; gap: 1.25rem; padding-top: 1.25rem; font-size: .9rem; font-weight: 700; color: var(--pine); }
.ec-pager a:hover { text-decoration: underline; }

/* The logo licence asks for a visible link of at least 12 pt. */
.ec-credit { margin: 2rem 0 0; padding-top: .9rem; border-top: 1px solid var(--rule); color: var(--stone); font-size: 1rem; }
.ec-credit a { text-decoration: underline; }
.ec-page { max-width: 52rem; padding-top: 1.5rem; }
.ec-page p { margin: .6rem 0 0; color: var(--stone); }
.ec-page a { color: var(--pine); text-decoration: underline; }
.ec-credits { margin-top: 1.5rem; font-size: .88rem; }
.ec-credits th, .ec-credits td { white-space: normal; overflow-wrap: anywhere; }
.ec-credits a { color: var(--pine); }

@media (max-width: 1120px) {
  .ec-week { grid-template-columns: 36px repeat(5, minmax(0, 1fr)); }
  .ec-rl { padding: .8rem 0 .8rem .5rem; }
  .ec-rl span { display: none; }
  .ec-week-done { grid-template-columns: 0 repeat(5, minmax(0, 1fr)); }
  .ec-wd > * { padding-left: .5rem; padding-right: .5rem; }
  .ec-week-l .ec-cos, .ec-week-m .ec-cos { grid-template-columns: minmax(0, 1fr); }
}
/* On a phone the week becomes a list of days and what has already passed drops out. */
@media (max-width: 760px) {
  .ec-week { display: block; }
  .ec-week::before, .ec-week::after { display: none; }
  .ec-wd { display: block; padding: .8rem 1rem .9rem; border-top: 1px solid var(--grid); }
  .ec-wd:first-of-type { border-top: 0; }
  .ec-wd > * { padding: 0; border-left: 0; background: none; }
  .ec-wd-today { background: var(--today); }
  .ec-wd-today > * { background: none; }
  .ec-wd-past, .ec-rl, .ec-slot-empty { display: none; }
  .ec-wd > .ec-wd-top { display: flex; align-items: center; justify-content: space-between; padding: 0; background: none; }
  .ec-wd-today > .ec-wd-top { background: none; }
  .ec-wd-tag { min-height: 0; margin: 0; }
  .ec-slot { margin-top: .9rem; border-top: 0; }
  .ec-slot-lab { position: static; display: flex; align-items: center; gap: .4rem; width: auto; height: auto; margin: 0 0 .6rem; overflow: visible; clip-path: none; color: var(--stone); font-family: var(--mono); font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; }
  .ec-week-l .ec-cos, .ec-week-m .ec-cos { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .9rem .75rem; }
  .ec-wd > .ec-wd-more { margin-top: .75rem; padding: 0; }
  .ec-wd > .ec-wd-more:empty { display: none; }
  .ec-later-row { grid-template-columns: minmax(0, 1fr) auto; gap: .5rem .75rem; padding: .8rem 1rem; }
  .ec-later-logos { grid-column: 1 / -1; grid-row: 2; }
  .ec-cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
  .ec-card { padding: .85rem .9rem; }
  :where(.ec) th, :where(.ec) td { padding-inline: .75rem; }
}
