@font-face {
	font-family: 'Type82Mono';
	src:url('./fonts/NType82Mono-Regular.woff2') format('woff2'),
	url('./fonts/NType82Mono-Regular.woff') format('woff');
	font-weight: 400;
	font-display: swap;
}

@font-face {
	font-family: 'NDot57';
	src:url('./fonts/NDot-57.woff2') format('woff2'),
	url('./fonts/NDot-57.woff') format('woff');
	font-weight: 400;
	font-display: swap;
}

#nbr-root {
	--f-regular: 'NType82', monospace;
	--f-mono: 'Type82Mono', monospace;
	--f-ndot: 'NDot55', monospace;
	--f-ndot57: 'NDot57', monospace;
	--f-lettera: 'LetteraMonoLL', monospace;

	--dot: var(--f-ndot);
	
    --widgets: #1b1b1e;
    --widgets-light: #f1f1f1;
    --widget-red: #d71920;
    --gap: 2.5vw;
    --unit: 19vw; /* one grid cell - width and height */
    --radius-pill: 999px;
    --radius-block: 24px;
}

#nbr-root .font-headline {
	font-family: var(--f-regular);
	font-weight: 700 !important;
}

#nbr-root .font-regular {
	font-family: var(--f-regular);
	font-weight: 400;
}

#nbr-root .font-mono {
	font-family: var(--f-mono);
}

#nbr-root .font-ndot {
	font-family: var(--f-ndot);
}

#nbr-root .font-ndot57 {
	font-family: var(--f-ndot57);
}

#nbr-root .font-lettera {
	font-family: var(--f-lettera);
}

#nbr-root .noto-emoji {
  font-family: "Noto Emoji", sans-serif;
  font-optical-sizing: auto;
  font-weight: 700;
  font-size: 65px;
  font-style: normal;
  color: var(--text-dark);
}

#nbr-root .widget .noto-emoji {
  font-size: 2.5em;
}

#nbr-root .dd-flag .noto-emoji {
  font-size: 65px;
}

html[data-theme="theme-dark"] #nbr-root .noto-emoji {
    color: var(--text);
}

#nbr-root * {
	box-sizing: border-box;
}

#nbr-root {
	margin: 0;
	color: var(--text);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

#nbr-root a {
	color: inherit;
}

#nbr-root .dotted-rule {
	border: none;
	border-top: 2px dotted var(--bg-invert);
	margin: 0;
}

#nbr-root header.top {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 2px dotted var(--bg-invert);
	background: var(--bg-light);
}

#nbr-root .top-inner {
	padding: 18px 0 14px;
}

#nbr-root .wordmark {
	display: flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
}

#nbr-root .wordmark .bar {
	display: inline-block;
	width: 4px;
	height: 20px;
	background: var(--red);
}

#nbr-root .top-meta {
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

#nbr-root .search-row {
	margin-top: 14px;
	display: flex;
	gap: 10px;
	align-items: normal;
	flex-direction: column;
}

#nbr-root .search-row #search {
	flex: 1;
	padding: 10px 12px;
	color: var(--text);
	outline: none;
	border-radius: 15px !important;
}

#nbr-root #search::placeholder {
	color: var(--text-muted);
}

#nbr-root #search:focus {
	outline: 2px solid var(--red);
	outline-offset: -1px;
}

#nbr-root .search-count {
	color: var(--text-muted);
	min-width: 90px;
	text-align: right;
	white-space: nowrap;
}

#nbr-root nav.tabs {
	padding: 0 24px;
	display: flex;
	gap: 2px;
	overflow-x: auto;
}

#nbr-root nav.tabs a {
	display: block;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	text-decoration: none;
	padding: 10px 14px;
	border-bottom: 2px solid transparent;
	white-space: nowrap;
}

#nbr-root nav.tabs a:hover {
	color: var(--red);
}

#nbr-root nav.tabs a.active {
	color: var(--text);
	border-bottom-color: var(--red);
}

#nbr-root main {
	padding: 40px 0 120px;
}

#nbr-root section {
	margin-bottom: 64px;
	scroll-margin-top: 110px;
}

#nbr-root .section-head {
	display: flex;
	align-items: baseline;
	gap: 14px;
	margin-bottom: 24px;
}

#nbr-root .section-head h2 {
	margin: 0;
}

#nbr-root .section-intro {
	margin: 0 0 28px;
}

#nbr-root .swatch-group-label {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--text-muted);
	margin: 28px 0 12px;
}

#nbr-root .swatch-group-label:first-child {
	margin-top: 0;
}

#nbr-root .swatches {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: var(--gap);
	text-align: center;
}

#nbr-root #colour .swatches {
    text-align: left;
}

#nbr-root .swatch {
	padding: 0;
	cursor: pointer;
	position: relative;
	border-radius: var(--radius-block);
    overflow: hidden;
    background: var(--widgets-light);
}

html[data-theme="theme-dark"] #nbr-root .swatch {
    background: var(--widgets);
}

#nbr-root .swatch .chip {
	height: 96px;
	width: 100%;
}

#nbr-root .swatch .meta {
	padding: 12px 14px 14px;
}

#nbr-root .swatch .name {
	font-weight: 700;
	text-transform: uppercase;
	margin-bottom: 6px;
}

#nbr-root .swatch .hex {
	font-family: var(--f-lettera);
	font-size: 12px;
	color: var(--text-muted);
}

#nbr-root .swatch .copied-flag {
	position: absolute;
	top: 10px;
	right: 10px;
	background: #000;
	padding: 3px 7px 0;
	opacity: 0;
	transition: opacity .15s;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #fff;
	font-size: 12px;
}

#nbr-root .swatch.copied .copied-flag {
	opacity: 1;
}

#nbr-root .swatch:hover .copied-flag {
	opacity: 1;
}

#nbr-root .type-card {
	margin-bottom: 1em;
	padding: 24px;
	background: var(--bg);
    border-radius: var(--radius-block);
}

#nbr-root .type-card-head {
	display: flex;
	justify-content: space-between;
	align-items: normal;
	flex-direction: column;
	flex-wrap: wrap;
	gap: 8px;
	cursor: pointer;
    list-style: none;
}

#nbr-root .type-card-head h3 {
	margin: 0;
	font-size: 30px;
	font-weight: normal;
}

#nbr-root .type-card-head h3::before {
    content: url('/lib/plugins/sectiontoggle/chevron-down.svg');
    display: inline-block;
    margin-right: 12px;
}

#nbr-root details[open] .type-card-head h3::before {
    transform: rotate(180deg);
    transform-origin: 50% 45%;
}

#nbr-root .type-card-content {
    margin-top: 10px;
    overflow: hidden;
    height: 0;
    transition: height 300ms ease;
}

#nbr-root details[open] .type-card-content {
    height: auto;
}

#nbr-root .type-card .type-pills {
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    flex: 1;
}

#nbr-root .button-primary {
    color: var(--button-default-text-color) !important;
    background-color: var(--button-default-background-color) !important;
    border-color: var(--button-default-border-color) !important;
    border: 2px solid;
}

#nbr-root .button-primary:hover {
    color: var(--button-default-text-hover-color) !important;
    background-color: var(--button-default-background-hover-color) !important;
    border-color: var(--button-default-border-hover-color) !important;
}

#nbr-root .download-dropdown {
    position: relative;
}

#nbr-root .dropdown-menu {
    position: absolute;
    background: var(--bg-light);
    border-radius: 10px;
    padding: 10px;
    width: max-content;
    right: 0;
    top: calc(100% + 5px);
    z-index: 1;
}

#nbr-root .dropdown-menu a {
    display: block;
    padding: .5em;
    border-bottom: 2px solid transparent;
}

#nbr-root .dropdown-menu a:hover {
    background: var(--bg);
    border-bottom: 2px solid transparent;
}

#nbr-root .dropdown-menu a:not(:last-of-type) {
    border-bottom: 2px dotted var(--bg-invert);
}

#nbr-root .dropdown-menu a::before, #nbr-root .dd-note .download-svg::before {
    content: "\f019";
    position: relative;
    left: 0;
    top: 2px;
    font-family: "FontAwesome" !important;
    font-style: normal;
    font-weight: normal !important;
    font-size: 16px;
    margin-right: .5rem;
}

#nbr-root .dd-note .download-font {
    color: #fff;
}

#nbr-root .type-tag {
	font-family: var(--f-lettera);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--text-muted);
	padding: 12px 15px 10px;
	font-size: 12px;
}

#nbr-root .type-desc {
	font-family: var(--f-regular);
	color: var(--text-muted);
	margin: 0 0 16px;
}

#nbr-root .type-demo {
	font-family: var(--f-regular);
	font-size: max(7.5pt, 1em);
	line-height: 1.15;
	margin: 14px 0 18px;
	word-break: break-word;
}

#nbr-root .type-demo.headline {
	font-family: var(--f-regular);
	font-size: max(40pt, 3em);
	font-weight: 700;
	letter-spacing: -0.01em;
}

#nbr-root .type-demo.mono {
	font-family: var(--f-mono);
	font-size: max(7.5pt, 1em);
}

#nbr-root .type-demo.dot {
	font-family: var(--f-ndot);
	font-size: max(10pt, 1.5em);
}

#nbr-root .type-demo.dot57 {
	font-family: var(--f-ndot57);
	font-size: 1.5em;
}

#nbr-root .type-demo.small {
	font-family: var(--f-lettera);
	font-size: 10pt;
	line-height: 1.7;
}

#nbr-root .quickguide {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 2px dotted var(--bg-invert);
}

#nbr-root .quickguide ol {
	margin: 8px 0 0;
	padding-left: 18px;
}

#nbr-root .quickguide li {
	margin-bottom: 4px;
}

#nbr-root .dd-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: var(--gap);
}

#nbr-root .dd-item {
	padding: 18px;
    background: var(--bg);
    border-radius: var(--radius-block);
    min-height: 115px;
}

#nbr-root .dd-item.icon {
    display: flex;
    justify-content: center;
    aspect-ratio: 1 / 1;
    position: relative;
}

#nbr-root .dd-item.emoji {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    aspect-ratio: 1 / 1;
}

#nbr-root .dot-canvas {
    padding-top: 12px;
    padding-left: 5px;
}

#nbr-root .dd-item .canvas-size-x, #nbr-root .dd-item .canvas-size-y {
    position: absolute;
    font-size: 0.7em;
    background: var(--bg);
    padding: 2px 5px;
    border-radius: 3px;
    z-index: 1;
}

#nbr-root .dd-item .canvas-size-x {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}

#nbr-root .dd-item .canvas-size-y {
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
}

#nbr-root .type-card-content .dd-item {
    background: var(--bg-dark);
}

#nbr-root .dd-flag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 10px;
	font-weight: 700;
	font-size: 12px;
}

#nbr-root .dd-flag .dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	display: inline-block;
}

#nbr-root .dd-flag .logo-svg, #nbr-root .dd-flag .weather-icon, #nbr-root .dd-flag .folder-icon {
    width: 100%;
    border-radius: 0;
    color: #000;
}

#nbr-root .dd-flag .logo-svg {
    height: 170px;
}

#nbr-root .dd-flag .weather-icon, #nbr-root .dd-flag .folder-icon {
    width: 100px;
    max-height: 100px;
}

html[data-theme="theme-dark"] #nbr-root .logo-svg, html[data-theme="theme-dark"] #nbr-root .weather-icon, html[data-theme="theme-dark"] #nbr-root .folder-icon {
    -webkit-filter: invert(100%);
    filter: invert(100%);
}

#nbr-root .dd-flag .image-wrapper {
    margin-bottom: 0;
}

#nbr-root .dd-flag .image-caption {
    display: none;
}

#nbr-root .dd-item.do .dot {
	background: #1a9c4b;
}

#nbr-root .dd-item.dont .dot {
	background: var(--red);
}

#nbr-root .dd-item.caution .dot {
	background: var(--yellow);
}

#nbr-root .dd-sample {
	font-size: 24px;
	margin-bottom: 10px;
	word-break: break-word;
}

#nbr-root .dd-note {
	font-family: var(--f-regular);
	color: var(--text-muted);
	font-size: 14px;
}

#nbr-root .lockup-list {
	border: 1px solid var(--grey);
	background: var(--bg);
}

#nbr-root .lockup-row {
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 16px 20px;
	border-top: 2px dotted var(--bg-invert);
	flex-wrap: wrap;
}

#nbr-root .lockup-row:first-child {
	border-top: none;
}

#nbr-root .lockup-sample {

	display: flex;
	align-items: center;
}

#nbr-root .dd-sample .bar {
	display: inline-block;
	width: 5px;
	height: 15px;
	background: var(--yellow);
}

#nbr-root .lockup-note {
	font-family: var(--f-regular);
	color: var(--text-muted);
	margin-left: auto;
}

#nbr-root .grid-demo {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 6px;
	height: 110px;
	margin: 18px 0;
}

#nbr-root .grid-demo div {
	background: repeating-linear-gradient(45deg, var(--ngrey), var(--ngrey) 4px, transparent 4px, transparent 8px);
	border: 1px dashed var(--grey);
}

#nbr-root .plain-list {
	font-family: var(--f-regular);
	list-style: none;
	margin: 0;
	padding: 0;
}

#nbr-root .plain-list li {
	padding: 10px 0;
	border-top: 2px dotted var(--bg-invert);
	display: flex;
	gap: 14px;
}

#nbr-root .plain-list li:first-child {
	border-top: none;
}

#nbr-root .plain-list .k {
	color: var(--text-muted);
	min-width: 150px;
	flex-shrink: 0;
}

#nbr-root .callout {
	font-family: var(--f-regular);
	border-left: 2px solid var(--red);
	padding: 12px 16px;
	background: var(--bg);
	color: var(--text-muted);
	margin-top: 20px;
}

#nbr-root footer {
	font-family: var(--f-regular);
	padding: 30px 24px 60px;
	color: var(--text-muted);
	border-top: 2px dotted var(--bg-invert);
}

#nbr-root .hidden {
	display: none !important;
}

#nbr-root mark {
	background: var(--yellow);
	color: var(--text);
	padding: 0 1px;
}

/* WIDGET GRID */
/* 4 base columns, each --unit wide. grid-auto-rows is the SAME value,
 so a 1x1 cell is a square and a 2x2 cell is a square at double scale.
 That's what makes 2 small circles line up under 1 big circle/square. */
.grid {
    display: grid;
    grid-template-columns: repeat(4, var(--unit));
    grid-auto-rows: var(--unit);
    gap: var(--gap);
    justify-content: center;
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    font-weight: normal;
    font-style: normal;
    margin-bottom: 2em;
}

.grid input[type='checkbox'] {
    display: none;
}

#screen_rotation_alt:checked + label, #bluetooth:checked + label, .widget.on {
    color: #fff !important;
    background: var(--widget-red) !important;
}

/* BASE WIDGET */
.widget {
    background: var(--widgets-light);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
    padding: 1em;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

html[data-theme="theme-dark"] #nbr-root .widget {
    background: var(--widgets);
}

.widget.accent { 
    background: var(--red);
    color: #fff;
}

.widget.large-text { 
    font-size: 8em;
    padding: 0.2em 0 0;
}

.widget.interactable {
    cursor: pointer;
}

.widget .logo-svg {
    width: calc(100% -98em);
}

.widget.h2 .logo-svg {
    width: calc(100% - 5em);
    min-width: 10em;
}

/* SHAPES */
.shape-pill   { border-radius: var(--radius-pill); }
.shape-block  { border-radius: var(--radius-block); }
.shape-circle { border-radius: 50%; }

/* SIZES */
.w1 { grid-column: span 1; padding: 1.5em; }
.w2 { grid-column: span 2; }
.w4 { grid-column: span 4; }
.h1 { grid-row: span 1; }
.h2 { grid-row: span 2; }

/* SPECIFIC STYLES */
.widget.pedometer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
}

.widget.pedometer .logo-svg {
  flex-shrink: 0;
}

.widget.pedometer::before,
.widget.pedometer::after {
  content: '';
  flex-grow: 1;
  height: 16px;
  background-repeat: repeat-x;
  background-position: center;
}

.widget.pedometer::before {
  background-image: radial-gradient(circle, currentColor 2px, transparent 3px);
  background-size: 10px 100%; /* spacing between dots */
}

.widget.pedometer::after {
  background-image: radial-gradient(circle, currentColor 1px, transparent 2px);
  background-size: 10px 100%;
}

.widget.bluetooth {
    display: flex;
    justify-content: flex-start;
    gap: 1em;
    padding: 0 2em;
    letter-spacing: normal;
    text-transform: none;
    font-size: inherit;
}

.widget.rec {
    display: flex;
    justify-content: flex-start;
    gap: 1.5em;
    padding: 5px 0 0 1.5em;
}

.widget.rec .rec-label {
    letter-spacing: normal;
    text-transform: uppercase;
    font-size: 1.8em;
    z-index: 1;
}

.widget.rec .rec-circle {
    background: var(--widget-red);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-top: -5px;
    transform: scale(1);
    transform-origin: center;
    transition: transform 550ms ease;
}

.widget.rec.expanding {
    gap: 0;
}

.widget.rec.expanding .rec-circle {
    transform: scale(10);
}

.widget.rec.expanding .rec-label {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
}

.widget.photo-widget {
    position: relative;
    touch-action: none;
}

.widget.photo-widget .photo-viewport {
    border-radius: 14px;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.widget.photo-widget .photo-track {
    height: 100%;
    transition: transform 0.28s ease;
    will-change: transform;
}

.widget.photo-widget .photo {
    filter: grayscale(1);
    -webkit-filter: grayscale(1);
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
}

.widget .clock { 
    position: relative; 
    width: 100%; 
    height: 100%; 
}

.widget .clock .hand-pivot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
}

.widget .clock .hand {
    position: absolute; 
    left: 0; 
    background: var(--widgets);
    border-radius: 50px;
    transform: translateX(-50%);
}

html[data-theme="theme-dark"] .widget .clock .hand {
    background: var(--widgets-light);
}

.widget .clock .hand.hour { 
    width: 25px;
    height: 75px;
    top: -65px;
}

.widget .clock .hand.min {
    width: 7px;
    height: 70px;
    background: #8f9193;
    top: -70px;
}

.widget .clock-dot {
    position: absolute;
    width: 7px;
    height: 7px;
    background: var(--widget-red);
    border-radius: 50%;
}

.widget.nx {
    flex-direction: column;
}

.widget.nx .battery {
    display: flex;
    gap: 28px;
    padding-left: 5px;
    padding-bottom: 5px;
}

/* TYPOGRAPHY EXAMPLES */
#nbr-root .dialog-wrapper > ::backdrop {
  background: rgba(0,0,0,0.7);
}

#nbr-root dialog {
    overflow-x: hidden;
    background: var(--bg-light);
    border-radius: var(--radius-block);
    border: none;
    color: var(--text);
    padding-top: 0;
}

#nbr-root dialog header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: var(--bg-light);
    border-bottom: 2px dotted var(--bg-invert);
    width: 100%;
    z-index: 1;
    padding: .5em 1em;
}

#nbr-root dialog header button {
    display: inline-flex;
    line-height: normal;
    aspect-ratio: 1 / 1;
}

#nbr-root .dialog-container .specimen {
    display: grid;
    grid-template-columns: minmax(100%, 1fr);
    align-items: start;
    margin-block: 5rem;
    overflow-x: hidden;
    margin: 14px 0;
    padding-bottom: 28px;
}

#nbr-root .dialog-container .specimen:not(:last-of-type) {
    border-bottom: 2px dotted var(--bg-invert);
}

#nbr-root .dialog-container .specimen-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#nbr-root .dialog-container .specimen-info h4 {
    margin: 0;
}

#nbr-root .dialog-container .specimen-sample {
    font-family: var(--font-family);
    font-size: var(--font-size);
    line-height: var(--leading);
    letter-spacing: var(--tracking);
    white-space: nowrap;
    width: max-content;
    height: max-content;
    position: relative;
    overflow: hidden;
    background: var(--yellow);
}

#nbr-root .dialog-container .specimen-sample span {
    display: block;
    position: relative;
    background: var(--bg-light);
}

#nbr-root .dialog-container .specimen-sample span:not(:last-of-type) {
    margin-bottom: max(0px, calc(
        (var(--font-size) * var(--leading-number)) -
        (var(--font-size) * var(--cap-ratio))
    ));
    text-box: trim-both cap alphabetic;
}

#nbr-root .dialog-container .specimen-sample span:first-of-type {
    text-box: trim-end cap alphabetic
}

#nbr-root .dialog-container .specimen-sample span:last-of-type {
    margin-bottom: 0;
    text-box: trim-start cap alphabetic;
}

/* DESKTOP VIEW */
@media (min-width: 900px) {
    #nbr-root {
        --unit: 90px; 
        --gap: 15px;
    }
    
    #nbr-root main {
    	padding: 40px 24px 120px;
    }
    
    #nbr-root .top-inner {
    	padding: 18px 24px 14px;
    }
    
    #nbr-root .search-row {
        align-items: center;
        flex-direction: row;
    }
    
    #nbr-root .grid {
        grid-template-columns: repeat(8, var(--unit));
    }
    
    #nbr-root .swatches {
    	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    #nbr-root .swatch {
        aspect-ratio: 1 / 1;
    }
    
    #nbr-root .type-card .type-card-head {
    	align-items: center;
    	flex-direction: row;
    }
    
    #nbr-root .type-card .type-pills {
        flex-direction: row;
        flex: none;
    }
    
    #nbr-root .type-desc {
    	max-width: 50%;
    }
    
    #nbr-root .dot-canvas {
        padding-top: 0;
        padding-left: 0;
    }
    
    #nbr-root .dialog-container .specimen {
        grid-template-columns: 200px minmax(400px, 1fr);
        gap: 2rem;
    }
    
    #nbr-root .dialog-container .specimen-info {
        display: block;
    }
}