:root {
  --paper: #f6f4ee;
  --ink: #172e32;
  --muted: #505e5d;
  --line: #c9cdc4;
  --accent: #a73c20;
  --sand: #e8e8d8;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.55 "Segoe UI","Helvetica Neue",Arial,sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

a {
  color: inherit;
  text-underline-offset: .22em;
}

button,input,textarea {
  font: inherit;
  color: inherit;
}

button,a {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

a:focus-visible,button:focus-visible,textarea:focus-visible {
  outline: 3px solid #ae461c;
  outline-offset: 4px;
}

[hidden] {
  display: none!important;
}

.skip {
  position: absolute;
  left: 1em;
  top: -5em;
  background: white;
  padding: .6em;
  z-index: 3;
}

.skip:focus {
  top: 1em;
}

header {
  border-bottom: 1px solid var(--line);
}

.bar,main,footer {
  max-width: 1180px;
  margin: auto;
  padding-inline: clamp(20px,5vw,76px);
}

.bar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand,nav a,.primary,.block,a.secondary {
  text-decoration: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 650;
}

.brand b {
  display: grid;
  display: inline-block;
  letter-spacing: -.1em;
  background: var(--ink);
  color: white;
  border-radius: 6px;
  padding: 0 .29em .04em .19em;
  font: 700 32px/1.05 Georgia,serif;
}

.brand span {
  color: #ffb56c;
}

nav {
  display: flex;
  gap: clamp(10px,3vw,35px);
}

nav a:hover,footer a:hover {
  text-decoration: underline;
}

.hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(28px,6vw,86px);
  align-items: center;
  padding-block: clamp(44px,7vw,98px);
}

.overline,.shift small,.kicker,.phase {
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
}

h1,h2,.shift strong {
  font-family: Georgia,"Times New Roman",serif;
  font-weight: 400;
  letter-spacing: -.045em;
}

.hero h1 {
  font-size: clamp(4rem,7.8vw,7rem);
  line-height: 1;
  margin: .21em 0;
}

.hero h1 em {
  color: var(--accent);
  font-weight: 400;
}

.intro {
  font-size: 1.17rem;
  max-width: 36ch;
  color: var(--muted);
}

.actions {
  display: flex;
  gap: .65rem;
  flex-wrap: wrap;
  margin-top: 1.8rem;
}

.primary,.secondary,.control,dialog button {
  border: 1px solid var(--ink);
  border-radius: 5px;
  padding: .66rem 1rem;
  font-weight: 600;
  display: inline-flex;
  gap: 1rem;
  align-items: center;
  font-size: .92rem;
}

.primary {
  color: white;
  background: var(--ink);
}

.primary:hover {
  background: #315659;
}

.secondary,.control,dialog button {
  background: transparent;
}

.secondary:hover,.control:hover {
  background: var(--sand);
}

.schedule {
  padding: 1.3rem;
  background: #dfe3d5;
  border: 1px solid #c9cfbf;
  border-radius: 10px;
  transform: rotate(1deg);
}

.schedule-title {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  padding: 0 .2rem .75rem;
}

.schedule-title span {
  font-size: .85rem;
}

.shift {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #fffaf0;
  border: 1px solid #d1ceba;
  padding: 1rem 1.35rem;
  display: grid;
  border-radius: 5px;
}

.shift+.shift {
  margin-top: 6px;
}

.shift:after {
  content: "";
  position: absolute;
  right: -22px;
  top: 12px;
  width: 115px;
  height: 115px;
  border: 18px double #d7c28f;
  border-radius: 50%;
  z-index: -1;
}

.shift strong {
  font-size: 2rem;
  line-height: 1.2;
}

.shift span {
  font-size: .82rem;
}

.night {
  background: #263f43;
  color: white;
  border-color: #263f43;
}

.night small {
  color: #f3cf97;
}

.night:after {
  border-color: #547075;
  transform: scale(1.25);
}

#percurso {
  scroll-margin-top: 1rem;
  padding-bottom: 3.5rem;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

h2 {
  font-size: clamp(1.65rem,3.5vw,2.65rem);
  line-height: 1.15;
}

.phase {
  margin: 1rem 0 .65rem;
}

.block {
  display: grid;
  grid-template-columns: 3em 1fr auto 1.4em;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding: .9rem .45rem;
}

.block:hover {
  background: #eaece2;
}

.block strong {
  font-weight: 550;
}

.number,.duration,#progress {
  color: var(--muted);
  font-size: .86rem;
}

.number {
  font-family: monospace;
}

.block em {
  font-size: .8rem;
  color: #336057;
}

.sheet,#lesson {
  max-width: 54rem;
  margin: auto;
  padding-block: 2.5rem 5rem;
}

.sheet h1,#lesson h1 {
  font-size: clamp(2.4rem,5vw,4.3rem);
  line-height: 1.05;
  margin: .4em 0;
}

.card {
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: clamp(16px,3vw,32px);
  margin-block: 1rem;
}

.card h3,.md h3 {
  margin: .4em 0;
}

.md p {
  margin: .65em 0;
  overflow-wrap: anywhere;
}

.md blockquote {
  margin: 1em 0;
  padding: .9em 1em;
  border-left: 3px solid var(--accent);
  background: #f2eee4;
  white-space: pre-wrap;
}

.md button {
  font-size: .8rem;
  margin: .45em 0;
}

.scroll {
  overflow: auto;
}

.md table {
  border-collapse: collapse;
  width: 100%;
  margin: .7em 0;
}

.md td,.md th {
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  padding: .5em;
}

.md th {
  background: var(--sand);
}

.attachments {
  display: grid;
  gap: .4em;
}

label {
  display: block;
  font-weight: 650;
  margin-top: 1em;
}

textarea {
  width: 100%;
  padding: 1em;
  margin: .4em 0 1em;
  background: white;
  border: 1px solid var(--line);
  border-radius: 4px;
}

dialog {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.5rem;
  width: min(90vw,42rem);
  max-height: 80vh;
}

dialog button {
  float: right;
}

dialog::backdrop {
  background: #172e3280;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1em;
  border-top: 1px solid var(--line);
  padding-block: 1.4rem;
  font-size: .85rem;
  color: var(--muted);
}

#status:not(:empty) {
  position: fixed;
  bottom: 1em;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;
  background: var(--ink);
  color: white;
  padding: .6em 1.1em;
  border-radius: 6px;
  z-index: 2;
}

@media(max-width:700px) {
  .hero {
    grid-template-columns: 1fr;
    padding-block: 2.2rem;
  }
  .schedule {
    transform: none;
  }
  .shift {
    padding: .7rem 1rem;
  }
  .schedule-title {
    font-size: .85rem;
  }
  .bar {
    height: 64px;
  }
  .brand {
    gap: 6px;
  }
  nav,.brand {
    font-size: .85rem;
  }
  .block {
    gap: .45rem;
    grid-template-columns: 1.8rem 1fr auto 1em;
  }
  .section-head {
    display: block;
  }
  .actions {
    margin-top: 1rem;
  }
  footer {
    flex-wrap: wrap;
  }
}

@media print {
  header,footer,.actions,.control,#status,dialog,.schedule {
    display: none;
  }
  .card {
    break-inside: auto;
  }
  main {
    max-width: none;
    padding: 0;
  }
}
